]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix DiG UDP query retry and fail-over bug
authorAram Sargsyan <aram@isc.org>
Wed, 15 Jun 2022 12:57:14 +0000 (12:57 +0000)
committerAram Sargsyan <aram@isc.org>
Fri, 22 Jul 2022 09:00:08 +0000 (09:00 +0000)
commitbe8ec6ef183fae7223a9f0f9cb8b9283bca5ab6f
tree0dd7c2b25bcee169bd8504836043d68e25f3845d
parentc00312771787a9910efe6a966b1cd9229b1b3710
Fix DiG UDP query retry and fail-over bug

When the `udp_ready()` callback function gets called with a failure
result code, DiG erroneously cancels the lookup.

Copy the logic behind `tcp_connected()` callback function into
`udp_ready()` so that DiG will now retry the failed query (if retries
are enabled) and then, if it fails again, it will fail-over to the next
server in the list, which synchronizes the behavior between TCP and UDP
modes.

Also, `udp_ready()` was calling `lookup_detach()` without calling
`lookup_attach()` first, but the issue was masked behind the fact
that `clear_current_lookup()` wasn't being called when needed, and
`lookup_detach()` was compensating for that. This also has been fixed.

(cherry picked from commit 3f3108552577c326b4dab6c3b631c51cf0040144)
bin/dig/dighost.c