]> 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 11:40:22 +0000 (14:40 +0300)
commit0f9b6a7bc18856ffd087ec23bb97f1ea3a5964b6
treeebf235895006a81c0562bca73b875e42dd4e5420
parent8585b92f9873c7522614a6264ef5e7f5d0921848
*_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).
tests/isc/netmgr_test.c