]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add attach/detach for the dns_dispatch_send()
authorOndřej Surý <ondrej@isc.org>
Thu, 3 Mar 2022 12:30:24 +0000 (13:30 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 4 Mar 2022 12:47:59 +0000 (13:47 +0100)
commitf3ca90a8046f3d0c35c451c826fdc105e69d402f
tree214fb03d241e6eeedd79e119f905787f9577388b
parent488b1a776c7a66279d0ff23660778be5044aaa7a
Add attach/detach for the dns_dispatch_send()

The order in which the netievents are processed on the network manager
loop is not guaranteed.  Therefore the recv/read callback can come
earlier than the send/write callback.

The dns_request API wasn't ready for this reordering and it was
destroying the dns_request_t object before the send callback has been
called.

Add additional attach/detach in the req_send()/req_senddone() functions
to make sure we don't destroy the dns_request_t while it's still being
references by asynchronous call.
lib/dns/request.c