diff options
-rw-r--r-- | nameser.h | 1 | ||||
-rw-r--r-- | print-domain.c | 9 | ||||
-rw-r--r-- | tests/TESTLIST | 3 | ||||
-rw-r--r-- | tests/dns-uri.out | 4 | ||||
-rw-r--r-- | tests/dns-uri.pcap | bin | 0 -> 549 bytes |
5 files changed, 17 insertions, 0 deletions
@@ -184,6 +184,7 @@ #define T_MAILB 253 /* transfer mailbox records */ #define T_MAILA 254 /* transfer mail agent records */ #define T_ANY 255 /* wildcard match */ +#define T_URI 256 /* uri records [RFC7553] */ /* * Values for class field diff --git a/print-domain.c b/print-domain.c index 63c541a8..b8355a90 100644 --- a/print-domain.c +++ b/print-domain.c @@ -332,6 +332,7 @@ const struct tok ns_type2str[] = { { T_MAILB, "MAILB" }, /* RFC 1035 */ { T_MAILA, "MAILA" }, /* RFC 1035 */ { T_ANY, "ANY" }, + { T_URI, "URI" }, /* RFC 7553 */ { 0, NULL } }; @@ -552,6 +553,14 @@ ns_rprint(netdissect_options *ndo, break; } + case T_URI: + if (!ND_TTEST_LEN(cp, len)) + return(NULL); + ND_PRINT(" %u %u ", GET_BE_U_2(cp), GET_BE_U_2(cp + 2)); + if (nd_printn(ndo, cp + 4, len - 4, ndo->ndo_snapend)) + return(NULL); + break; + case T_OPT: ND_PRINT(" UDPsize=%u", class); if (opt_flags & 0x8000) diff --git a/tests/TESTLIST b/tests/TESTLIST index 35786eec..55e3f38e 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -669,3 +669,6 @@ dns-badvers dns-badvers.pcap dns-badvers.out # LLDP lldp-app-priority lldp-app-priority.pcap lldp-app-priority.out -v + +# DNS URI RR support tests +dns-uri dns-uri.pcap dns-uri.out diff --git a/tests/dns-uri.out b/tests/dns-uri.out new file mode 100644 index 00000000..232846ef --- /dev/null +++ b/tests/dns-uri.out @@ -0,0 +1,4 @@ + 1 18:31:55.600983 IP 127.0.0.1.59347 > 127.0.0.1.53: 44845+ [1au] URI? _http.dns.test. (55) + 2 18:31:55.601140 IP 127.0.0.1.53 > 127.0.0.1.59347: 44845* 1/0/1 URI 10 5 http://www.dns.test:8000 (83) + 3 18:31:57.245707 IP 127.0.0.1.37251 > 127.0.0.1.53: 25957+ [1au] URI? _ftp.dns.test. (54) + 4 18:31:57.245858 IP 127.0.0.1.53 > 127.0.0.1.37251: 25957 NXDomain* 0/1/1 (101) diff --git a/tests/dns-uri.pcap b/tests/dns-uri.pcap Binary files differnew file mode 100644 index 00000000..70e80242 --- /dev/null +++ b/tests/dns-uri.pcap |