]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4330. [protocol] Identify the PAD option as "PAD" when printing out
authorMark Andrews <marka@isc.org>
Thu, 10 Mar 2016 05:53:06 +0000 (16:53 +1100)
committerMark Andrews <marka@isc.org>
Thu, 10 Mar 2016 05:54:51 +0000 (16:54 +1100)
                        a message.

(cherry picked from commit 33a4294f442f7505c8e2453beb422b5928ec697c)

CHANGES
lib/dns/include/dns/message.h
lib/dns/message.c

diff --git a/CHANGES b/CHANGES
index 54d145ce68f00f1daabe68884b4a273b087a7638..85b8eca93d7d92a710c801668f8fbe29c5bbd9f3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4330.  [protocol]      Identify the PAD option as "PAD" when printing out
+                       a message.
+
        --- 9.9.9b1 released ---
 
 4329.  [func]          Warn about a common misconfiguration when forwarding
index 395d066a48515d1bcaa8cb8020e8b58cd3b4778f..db19d2fa79e382f3f47480f13743a4f63647add7 100644 (file)
 #define DNS_MESSAGEEXTFLAG_DO          0x8000U
 
 /*%< EDNS0 extended OPT codes */
-#define DNS_OPT_NSID           0x0003          /*%< NSID opt code */
-#define DNS_OPT_CLIENT_SUBNET  0x0008          /*%< client subnet opt code */
-#define DNS_OPT_EXPIRE         0x0009          /*%< EXPIRE opt code */
-#define DNS_OPT_COOKIE         0x000a          /*%< COOKIE opt code */
+#define DNS_OPT_NSID           3               /*%< NSID opt code */
+#define DNS_OPT_CLIENT_SUBNET  8               /*%< client subnet opt code */
+#define DNS_OPT_EXPIRE         9               /*%< EXPIRE opt code */
+#define DNS_OPT_COOKIE         10              /*%< COOKIE opt code */
+#define DNS_OPT_PAD            12              /*%< PAD opt code */
 
 /*%< The number of EDNS options we know about. */
 #define DNS_EDNSOPTIONS        4
index a8d420c572eb509053cead884f50226cc327830b..550058bb018bc340e73e380fbd7d5d05ecbe8d57 100644 (file)
@@ -3295,6 +3295,8 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
                                        continue;
                                }
                                ADD_STRING(target, "; EXPIRE");
+                       } else if (optcode == DNS_OPT_PAD) {
+                               ADD_STRING(target, "; PAD");
                        } else {
                                ADD_STRING(target, "; OPT=");
                                snprintf(buf, sizeof(buf), "%u", optcode);