bind9/bin/dig
Aram Sargsyan 1294de8e36 Fix dig hanging issue in cases when the lookup's next query can't start
In recv_done(), when dig decides to start the lookup's next query in
the line using `start_udp()` or `start_tcp()`, and for some reason,
no queries get started, dig doesn't cancel the lookup.

This can occur, for example, when there are two queries in the lookup,
one with a regular IP address, and another with a IPv4 mapped IPv6
address. When the regular IP address fails to serve the query, its
`recv_done()` callback starts the next query in the line (in this
case the one with a mapped IP address), but because `dig` doesn't
connect to such IP addresses, and there are no other queries in the
list, no new queries are being started, and the lookup keeps hanging.

After calling `start_udp()` or `start_tcp()` in `recv_done()`, check
if there are no pending/working queries then cancel the lookup instead
of only detaching from the current query.

(cherry picked from commit 7e2f50c369)
2022-04-04 09:18:46 +00:00
..
.gitignore [master] update gitignore files; use rev-parse to get srcid 2014-06-17 13:49:30 -07:00
dig.c Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
dig.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 11:01:32 +01:00
dighost.c Fix dig hanging issue in cases when the lookup's next query can't start 2022-04-04 09:18:46 +00:00
dighost.h Fix "dig +nssearch" indefinitely hanging issue 2022-04-01 11:53:33 +00:00
host.c Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
host.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 11:01:32 +01:00
Makefile.am Move the include Makefile.tests to the bottom of Makefile.am(s) 2021-06-24 15:33:52 +02:00
nslookup.c Replace ISC_NORETURN with C11's noreturn 2022-03-25 08:42:18 +01:00
nslookup.rst Add internal hyperlinks to See Also section of manual pages 2022-03-14 11:01:32 +01:00
readline.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00