Skip to content

[Backport to 9.18] TLS DNS: do not call accept callback twice

Before the changes from this commit were introduced, the accept callback function will get called twice when accepting connection during two of these stages:

  • when accepting the TCP connection;
  • when handshake has completed.

That is clearly an error, as it should have been called only once. As far as I understand it the mistake is a result of TLS DNS transport being essentially a fork of TCP transport, where calling the accept callback immediately after accepting TCP connection makes sense.

This commit fixes this mistake. It did not have any very serious consequences because in BIND the accept callback only checks an ACL and updates stats.

(backport of !6439 (merged))

Merge request reports