]> 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 03:58:08 +0000 (13:58 +1000)
commitdeb3b85cb2faba8fd72172a8df0e0631033196aa
treebcbde6aa9a5f2ef2490d8fcc2da251e0ad3b7f9f
parentd3bd90f3a7d62b0a597842bbea8525fa185331c9
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.
bin/dig/dighost.c