]> 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:06 +0000 (14:30 +1000)
commit5cc841fa53c37582a2181bc4fad96da99403df4c
tree9c9bf3a3bea3440fbba3799ae838cefbab9b44ec
parent6021b95451189fa947007d76472944c89d0bfa88
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