2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

count statistics in netmgr UDP code

- also restored a test in the statistics test which was changed when
  the netmgr was introduced because active sockets were not being
  counted.
This commit is contained in:
Evan Hunt
2020-01-06 20:26:47 -08:00
parent 80a5c9f5c8
commit 90a1dabe74
3 changed files with 32 additions and 11 deletions

View File

@@ -855,6 +855,8 @@ isc__nmsocket_prep_destroy(isc_nmsocket_t *sock) {
if (sock->children != NULL) {
for (int i = 0; i < sock->nchildren; i++) {
atomic_store(&sock->children[i].active, false);
isc__nm_decstats(sock->mgr,
sock->statsindex[STATID_ACTIVE]);
}
}
@@ -950,6 +952,7 @@ isc__nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr,
} else {
sock->statsindex = udp6statsindex;
}
isc__nm_incstats(sock->mgr, sock->statsindex[STATID_ACTIVE]);
break;
case isc_nm_tcpsocket:
case isc_nm_tcplistener:
@@ -960,6 +963,7 @@ isc__nmsocket_init(isc_nmsocket_t *sock, isc_nm_t *mgr,
sock->statsindex = tcp6statsindex;
}
break;
isc__nm_incstats(sock->mgr, sock->statsindex[STATID_ACTIVE]);
default:
break;
}