Skip to content

correct TCP error handling in dispatch and resolver

Ondřej Surý requested to merge 3133-tcp-error-handling-v9_18 into v9_18
  • 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.

(cherry picked from commit b6d40b3c)

Closes #3133 (closed)

Merge request reports