]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TCP KEEPALIVE was missing from yaml output
authorEvan Hunt <each@isc.org>
Tue, 1 Oct 2019 22:37:40 +0000 (15:37 -0700)
committerEvan Hunt <each@isc.org>
Fri, 4 Oct 2019 05:52:16 +0000 (22:52 -0700)
lib/dns/message.c

index 0377450d02a0e7022156bab205979d46be1b9195..9c6292a9a38f0b940075da75366d7e702f84f770 100644 (file)
@@ -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:");