]> git.ipfire.org Git - thirdparty/bind9.git/commit
remove unnecessary assertion in dns_dispatch_connect()
authorEvan Hunt <each@isc.org>
Wed, 13 Jul 2022 19:38:55 +0000 (12:38 -0700)
committerEvan Hunt <each@isc.org>
Thu, 14 Jul 2022 23:31:01 +0000 (16:31 -0700)
commit25ddec8a0a8e0549b69f4e601028f3323d3c1886
tree676adf824abd5a04f4bdf76e13da268bc4590b3c
parent2488dbbb33207d0e1a002a34ad3d52059dc28195
remove unnecessary assertion in dns_dispatch_connect()

When a thread calls dns_dispatch_connect() on an unconnected TCP socket
it sets `tcpstate` from `DNS_DISPATCHSTATE_NONE` to `_CONNECTING`.
Previously, it then INSISTed that there were no pending connections
before calling isc_nm_tcpdnsconnect().

If a second thread called dns_dispatch_connect() during that window
of time, it could add a pending connection to the list, and trigger
an assertion failure.

This commit removes the INSIST since the condition is actually
harmless.
CHANGES
lib/dns/dispatch.c