From 8e9a58eaa7533e31065309f18e98eafa43ebb8ba Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 1 Oct 2019 15:37:40 -0700 Subject: [PATCH] TCP KEEPALIVE was missing from yaml output --- lib/dns/message.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/dns/message.c b/lib/dns/message.c index 0377450d02..9c6292a9a3 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -3600,6 +3600,20 @@ dns_message_pseudosectiontoyaml(dns_message_t *msg, ADD_STRING(target, ")\n"); 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) { INDENT(style); ADD_STRING(target, "PAD:");