]> git.ipfire.org Git - thirdparty/bind9.git/commit
Don't use view->resolver directly when priming in dns_view_find()
authorOndřej Surý <ondrej@isc.org>
Wed, 9 Nov 2022 17:04:23 +0000 (18:04 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 11 Nov 2022 10:47:44 +0000 (11:47 +0100)
commita8ba2403254ea120f31f849ee7f0cb2f996e6c2a
treea70527d223f509a44df4560216878ecfc00215ad
parent54a425ab57a0a193e45ad3e16c76befda7348db5
Don't use view->resolver directly when priming in dns_view_find()

When starting priming from dns_view_find(), the dns_view shutdown could
be initiated by different thread, detaching from the resolver.  Use
dns_view_getresolver() to attach to the resolver under view->lock, so we
don't try to call dns_resolver_prime() with NULL pointer.

There are more accesses to view->resolver, (and also view->adb and
view->requestmgr that suffer from the same problem) in the dns_view
module, but they are all done in exclusive mode or under a view->lock.
lib/dns/view.c