2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Merge branch '3235-dig-exitcode' into 'main'

ensure dig sets exitcode after local UDP connection failure

Closes #3235

See merge request isc-projects/bind9!6107
This commit is contained in:
Evan Hunt
2022-04-15 18:08:10 +00:00
2 changed files with 9 additions and 0 deletions

View File

@@ -1,3 +1,6 @@
5862. [bug] dig returned a 0 exit status on UDP connection failure.
[GL #3235]
5861. [func] Implement support for catalog zones change of ownership
(coo) mechanism described in the DNS catalog zones draft
version 5 document. [GL #3223]

View File

@@ -3120,6 +3120,10 @@ udp_ready(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
dig_lookup_t *l = query->lookup;
debug("udp setup failed: %s", isc_result_totext(eresult));
if (exitcode < 9) {
exitcode = 9;
}
query_detach(&query);
cancel_lookup(l);
lookup_detach(&l);
@@ -3980,6 +3984,8 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
if (eresult == ISC_R_EOF) {
requeue_or_update_exitcode(l);
} else if (exitcode < 9) {
exitcode = 9;
}
goto cancel_lookup;