2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

TCP KEEPALIVE was missing from yaml output

This commit is contained in:
Evan Hunt
2019-10-01 15:37:40 -07:00
parent 69322c7357
commit 8e9a58eaa7

View File

@@ -3600,6 +3600,20 @@ dns_message_pseudosectiontoyaml(dns_message_t *msg,
ADD_STRING(target, ")\n"); ADD_STRING(target, ")\n");
continue; continue;
} }
} else if (optcode == DNS_OPT_TCP_KEEPALIVE) {
if (optlen == 2) {
unsigned int dsecs;
dsecs = isc_buffer_getuint16(&optbuf);
INDENT(style);
ADD_STRING(target, "TCP-KEEPALIVE: ");
snprintf(buf, sizeof(buf), "%u.%u",
dsecs / 10U, dsecs % 10U);
ADD_STRING(target, buf);
ADD_STRING(target, " secs\n");
continue;
}
INDENT(style);
ADD_STRING(target, "TCP-KEEPALIVE:");
} else if (optcode == DNS_OPT_PAD) { } else if (optcode == DNS_OPT_PAD) {
INDENT(style); INDENT(style);
ADD_STRING(target, "PAD:"); ADD_STRING(target, "PAD:");