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

netmgr fixes needed for dispatch

- The read timer must always be stopped when reading stops.

- Read callbacks can now call isc_nm_read() again in TCP, TCPDNS and
  TLSDNS; previously this caused an assertion.

- The wrong failure code could be sent after a UDP recv failure because
  the if statements were in the wrong order. the check for a NULL
  address needs to be after the check for an error code, otherwise the
  result will always be set to ISC_R_EOF.

- When aborting a read or connect because the netmgr is shutting down,
  use ISC_R_SHUTTINGDOWN. (ISC_R_CANCELED is now reserved for when the
  read has been canceled by the caller.)

- A new function isc_nmhandle_timer_running() has been added enabling a
  callback to check whether the timer has been reset after processing a
  timeout.

- Incidental netmgr fix: always use isc__nm_closing() instead of
  referencing sock->mgr->closing directly

- Corrected a few comments that used outdated function names.
This commit is contained in:
Ondřej Surý
2021-07-26 13:14:41 +02:00
committed by Evan Hunt
parent d9e1ad9e37
commit 9ee60e7a17
8 changed files with 192 additions and 109 deletions

View File

@@ -976,8 +976,8 @@ struct isc_nmsocket {
atomic_bool listening;
atomic_bool connecting;
atomic_bool connected;
bool accepting;
bool reading;
atomic_bool accepting;
atomic_bool reading;
isc_refcount_t references;
/*%