Skip to content

Don't use view->resolver directly when priming in dns_view_find()

Ondřej Surý requested to merge ondrej-dns_view-resolver-can-be-NULL into main

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.

Merge request reports