2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

4805. [bug] TCP4Active and TCP6Active weren't being updated

correctly. [RT #46454]
This commit is contained in:
Mark Andrews 2017-11-02 10:42:42 +11:00
parent 4359be18f4
commit 92bbc9914c
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,6 @@
4805. [bug] TCP4Active and TCP6Active weren't being updated
correctly. [RT #46454]
4804. [port] win32: access() does not work on directories as 4804. [port] win32: access() does not work on directories as
required by POSIX. Supply a alternative in required by POSIX. Supply a alternative in
isc_file_isdirwritable. [RT #46394] isc_file_isdirwritable. [RT #46394]

View File

@ -3724,6 +3724,12 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
*/ */
dev->address = NEWCONNSOCK(dev)->peer_address; dev->address = NEWCONNSOCK(dev)->peer_address;
if (NEWCONNSOCK(dev)->active == 0) {
inc_stats(manager->stats,
NEWCONNSOCK(dev)->statsindex[STATID_ACTIVE]);
NEWCONNSOCK(dev)->active = 1;
}
LOCK(&manager->fdlock[lockid]); LOCK(&manager->fdlock[lockid]);
manager->fds[fd] = NEWCONNSOCK(dev); manager->fds[fd] = NEWCONNSOCK(dev);
manager->fdstate[fd] = MANAGED; manager->fdstate[fd] = MANAGED;
@ -3749,7 +3755,6 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
UNLOCK(&manager->lock); UNLOCK(&manager->lock);
inc_stats(manager->stats, sock->statsindex[STATID_ACCEPT]); inc_stats(manager->stats, sock->statsindex[STATID_ACCEPT]);
inc_stats(manager->stats, sock->statsindex[STATID_ACTIVE]);
} else { } else {
inc_stats(manager->stats, sock->statsindex[STATID_ACCEPTFAIL]); inc_stats(manager->stats, sock->statsindex[STATID_ACCEPTFAIL]);
NEWCONNSOCK(dev)->references--; NEWCONNSOCK(dev)->references--;