debug printout for edns padding option (printed at high verbosity in log for incoming packets)

git-svn-id: file:///svn/unbound/trunk@3718 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2016-05-12 12:17:50 +00:00
parent 455a681204
commit 01f90611b1
2 changed files with 6 additions and 1 deletions

View file

@ -420,7 +420,8 @@ enum sldns_enum_edns_option
LDNS_EDNS_DAU = 5, /* RFC6975 */ LDNS_EDNS_DAU = 5, /* RFC6975 */
LDNS_EDNS_DHU = 6, /* RFC6975 */ LDNS_EDNS_DHU = 6, /* RFC6975 */
LDNS_EDNS_N3U = 7, /* RFC6975 */ LDNS_EDNS_N3U = 7, /* RFC6975 */
LDNS_EDNS_CLIENT_SUBNET = 8 /* draft-vandergaast-edns-client-subnet */ LDNS_EDNS_CLIENT_SUBNET = 8, /* draft-vandergaast-edns-client-subnet */
LDNS_EDNS_PADDING = 12 /* RFC7830 */
}; };
typedef enum sldns_enum_edns_option sldns_edns_option; typedef enum sldns_enum_edns_option sldns_edns_option;

View file

@ -165,6 +165,7 @@ static sldns_lookup_table sldns_edns_options_data[] = {
{ 6, "DHU" }, { 6, "DHU" },
{ 7, "N3U" }, { 7, "N3U" },
{ 8, "edns-client-subnet" }, { 8, "edns-client-subnet" },
{ 12, "Padding" },
{ 0, NULL} { 0, NULL}
}; };
sldns_lookup_table* sldns_edns_options = sldns_edns_options_data; sldns_lookup_table* sldns_edns_options = sldns_edns_options_data;
@ -1864,6 +1865,9 @@ int sldns_wire2str_edns_option_print(char** s, size_t* sl,
case LDNS_EDNS_CLIENT_SUBNET: case LDNS_EDNS_CLIENT_SUBNET:
w += sldns_wire2str_edns_subnet_print(s, sl, optdata, optlen); w += sldns_wire2str_edns_subnet_print(s, sl, optdata, optlen);
break; break;
case LDNS_EDNS_PADDING:
w += print_hex_buf(s, sl, optdata, optlen);
break;
default: default:
/* unknown option code */ /* unknown option code */
w += print_hex_buf(s, sl, optdata, optlen); w += print_hex_buf(s, sl, optdata, optlen);