]> git.ipfire.org Git - thirdparty/bind9.git/commit
Reset dig exit code after a TCP connection is established
authorMichał Kępień <michal@isc.org>
Fri, 24 Aug 2018 11:49:45 +0000 (13:49 +0200)
committerMark Andrews <marka@isc.org>
Mon, 27 Aug 2018 04:30:51 +0000 (14:30 +1000)
commitbfdeac09afaadd61032d16d0810009ea6eb97021
tree0953b31d9e94895901ef759070ddaa0978457e58
parent9e44e320c50dca6cdb6d424eae61d572844f587b
Reset dig exit code after a TCP connection is established

The "exitcode" variable is set to 9 if a TCP connection fails, but is
not reset to 0 if a subsequent TCP connection succeeds.  This causes dig
to return a non-zero exit code if it succeeds in getting a TCP response
after a retry.  Fix by resetting "exitcode" to 0 if connect_done()
receives an event with the "result" field set to ISC_R_SUCCESS.

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