2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 07:35:26 +00:00

enable keepalive when the keepalive EDNS option is seen

previously, receiving a keepalive option had no effect on how
long named would keep the connection open; there was a place to
configure the keepalive timeout but it was never used. this commit
corrects that.

this also fixes an error in isc__nm_{tcp,tls}dns_keepalive()
in which the sense of a REQUIRE test was reversed; previously this
error had not been noticed because the functions were not being
used.
This commit is contained in:
Evan Hunt
2020-11-02 18:33:20 -08:00
parent 19e24e22f5
commit 7867b8b57d
5 changed files with 31 additions and 2 deletions

View File

@@ -1442,7 +1442,7 @@ isc__nm_tcpdns_keepalive(isc_nmhandle_t *handle, bool value) {
REQUIRE(VALID_NMHANDLE(handle));
REQUIRE(VALID_NMSOCK(handle->sock));
REQUIRE(handle->sock->type != isc_nm_tcpdnssocket);
REQUIRE(handle->sock->type == isc_nm_tcpdnssocket);
sock = handle->sock;