From: Mark Andrews Date: Thu, 10 Mar 2016 05:53:06 +0000 (+1100) Subject: 4330. [protocol] Identify the PAD option as "PAD" when printing out X-Git-Tag: v9.11.0a1~48 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=33a4294f442f7505c8e2453beb422b5928ec697c;p=thirdparty%2Fbind9.git 4330. [protocol] Identify the PAD option as "PAD" when printing out a message. --- diff --git a/CHANGES b/CHANGES index 0a789b07511..dc71bd7984e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4330. [protocol] Identify the PAD option as "PAD" when printing out + a message. + 4329. [func] Warn about a common misconfiguration when forwarding RFC 1918 zones. [RT #41441] diff --git a/lib/dns/include/dns/message.h b/lib/dns/include/dns/message.h index 477e241fe54..71d9aa6e08d 100644 --- a/lib/dns/include/dns/message.h +++ b/lib/dns/include/dns/message.h @@ -102,10 +102,11 @@ #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 */ /*%< Experimental options [65001...65534] as per RFC6891 */ diff --git a/lib/dns/message.c b/lib/dns/message.c index e5e90e444ca..d05f218d873 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -3393,6 +3393,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);