BUG/MINOR: resolvers: preserve nameserver identity on "clear counters all"
The resolvers statistics module stores the nameserver's id, its parent
resolvers' id and the nameserver's puid in the counters structure, next
to the counters themselves. "clear counters all" resets all counters by
copying the module's template over them in resolv_stats_clear_counters(),
which also clears these fields. As a result, "show stat domain resolvers"
reports empty "id" and "pid" fields for all nameservers afterwards, and
ns_puid becomes zero, so that server address changes performed by a DNS
resolution are then attributed to the wrong nameserver
(SERVER_INETADDR_UPDATER_DNS_RESOLVER(counters->ns_puid)).
This can be reproduced with any resolvers section:
> clear counters all
> show stat domain resolvers
# id,pid,sent,...
,,0,0,...
Let's restore these fields after the reset, as done when allocating the
counters.
This patch should be backported to all stable branches.