]> git.ipfire.org Git - thirdparty/bind9.git/commit
*_noresponse, tlsdns_listen_noalpn: csends == 1 is not guaranteed
authorArtem Boldariev <artem@boldariev.com>
Fri, 1 Jul 2022 23:20:39 +0000 (02:20 +0300)
committerArtem Boldariev <artem@boldariev.com>
Tue, 12 Jul 2022 12:31:20 +0000 (15:31 +0300)
commitd6041e5d45329efcd060e2252eb679cc0cf5e101
tree86cf106e90e5d734d8465753696037647673ebd9
parentc85949fbe1ee073b766ad9ac966f28351fc42d28
*_noresponse, tlsdns_listen_noalpn: csends == 1 is not guaranteed

This commit removes an assertion from the unit test which cannot be
guaranteed.

According to the test, exactly one client send must succeed. However,
it cannot really be guaranteed, as do not start to read data in the
accept callback on the server nor attach to the accepted handle. Thus,
we can expect the connection to be closed soon after we have returned
from the callback.

Interestingly enough, the test would pass just fine on TCP because:

a) there are fewer layers involved and thus there is less processing;

b) it is possible for the data to be sent and end up in an internal OS
socket buffer without being touched by an application's code on the
server. In such a case the client's write callback still would be
called successfully;

There is a chance for the test to succeed over TLS as well (as it
happily did before), but as the code has been changed to close unused
connections as soon as possible, the chance is far slimmer now.

What can be guaranteed is:

* cconnects == 1 (number client connections equals 1);
* saccepts == 1 (number of accepted connections equals 1).

(cherry picked from commit 0f9b6a7bc18856ffd087ec23bb97f1ea3a5964b6)
tests/isc/netmgr_test.c