]> git.ipfire.org Git - thirdparty/bind9.git/commit
correct TCP error handling in dispatch and resolver
authorEvan Hunt <each@isc.org>
Wed, 9 Feb 2022 22:56:04 +0000 (14:56 -0800)
committerOndřej Surý <ondrej@isc.org>
Thu, 17 Feb 2022 08:59:12 +0000 (09:59 +0100)
commitb6d40b3c4e4452cee6f7f06d889e4e8d113e9588
tree60cc1a761f485881c9f17d6a7787896448e01e22
parentae4cd57ed5abc8a8b7b16d1c9d6089185cb66e5f
correct TCP error handling in dispatch and resolver

- certain TCP result codes, including ISC_R_EOF and
  ISC_R_CONNECTIONRESET, were being mapped to ISC_R_SHUTTINGDOWN
  before calling the response handler in tcp_recv_cancelall().
  the result codes should be passed through to the response handler
  without being changed.

- the response handlers, resquery_response() and req_response(), had
  code to return immediately if encountering ISC_R_EOF, but this is
  not the correct behavior; that should only happen in the case of
  ISC_R_CANCELED when it was the caller that canceled the operation

- ISC_R_CONNECTIONRESET was not being caught in rctx_dispfail().

- removed code in rctx_dispfail() to retry queries without EDNS
  when receiving ISC_R_EOF; this is now treated the same as any
  other connection failure.
lib/dns/dispatch.c
lib/dns/request.c
lib/dns/resolver.c