2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14: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

@@ -1508,6 +1508,7 @@ process_opt(ns_client_t *client, dns_rdataset_t *opt) {
}
client->attributes |=
NS_CLIENTATTR_USEKEEPALIVE;
isc_nmhandle_keepalive(client->handle, true);
isc_buffer_forward(&optbuf, optlen);
break;
case DNS_OPT_PAD: