]> git.ipfire.org Git - thirdparty/bind9.git/commit
Refactor dispatch, resolver and request
authorEvan Hunt <each@isc.org>
Wed, 26 May 2021 05:54:17 +0000 (22:54 -0700)
committerEvan Hunt <each@isc.org>
Sat, 2 Oct 2021 18:39:56 +0000 (11:39 -0700)
commit7dc54fa6f2da81162f4a12469a775c8bc7b48bbd
tree2f9f9dd7ca11dfbecdb18bdc0c32076491a750e4
parent08ce69a0ea1c33cbf62b6b5896affb047a71be42
Refactor dispatch, resolver and request

Since every dispsock was associated with a dispentry anyway (though not
always vice versa), the members of dispsock have been combined into
dispentry, which is now reference-counted.  dispentry objects are now
attached before connecting and detached afterward to prevent races
between the connect callback and dns_dispatch_removeresponse().

Dispatch and dispatchmgr objects are now reference counted as well, and
the shutdown process has been simplified.  reference counting of
resquery and request objects has also been cleaned up significantly.

dns_dispatch_cancel() now flags a dispentry as having been canceled, so
that if the connect callback runs after cancellation, it will not
initiate a read.

The isblackholed() function has been simplified.
16 files changed:
bin/named/server.c
bin/nsupdate/nsupdate.c
bin/tests/system/pipelined/pipequeries.c
bin/tests/system/tkey/keycreate.c
bin/tests/system/tkey/keydelete.c
bin/tools/mdig.c
lib/dns/client.c
lib/dns/dispatch.c
lib/dns/include/dns/dispatch.h
lib/dns/include/dns/request.h
lib/dns/request.c
lib/dns/resolver.c
lib/dns/tests/dispatch_test.c
lib/dns/tests/resolver_test.c
lib/dns/zone.c
lib/ns/tests/nstest.c