DHCPv6 decoder update (RFC3646, DNS options)
- Add decoder for option 24 (DOMAIN_LIST)
- Rename option 23 as DNS_SERVERS
- Rename option 24 as DOMAIN_LIST
- In dhcp6opt_print() constify dh6o
diff --git a/print-dhcp6.c b/print-dhcp6.c
index b317eb4..52f823d 100644
--- a/print-dhcp6.c
+++ b/print-dhcp6.c
@@ -147,8 +147,8 @@
 #define DH6OPT_RECONF_ACCEPT 20
 #define DH6OPT_SIP_SERVER_D 21
 #define DH6OPT_SIP_SERVER_A 22
-#define DH6OPT_DNS 23
-#define DH6OPT_DNSNAME 24
+#define DH6OPT_DNS_SERVERS 23
+#define DH6OPT_DOMAIN_LIST 24
 #define DH6OPT_IA_PD 25
 #define DH6OPT_IA_PD_PREFIX 26
 #define DH6OPT_NIS_SERVERS 27
@@ -235,9 +235,9 @@
 		return "SIP-servers-domain";
 	case DH6OPT_SIP_SERVER_A:
 		return "SIP-servers-address";
-	case DH6OPT_DNS:
+	case DH6OPT_DNS_SERVERS:
 		return "DNS-server";
-	case DH6OPT_DNSNAME:
+	case DH6OPT_DOMAIN_LIST:
 		return "DNS-search-list";
 	case DH6OPT_IA_PD:
 		return "IA_PD";
@@ -335,7 +335,7 @@
 static void
 dhcp6opt_print(const u_char *cp, const u_char *ep)
 {
-	struct dhcp6opt *dh6o;
+	const struct dhcp6opt *dh6o;
 	const u_char *tp;
 	size_t i;
 	u_int16_t opttype;
@@ -589,7 +589,7 @@
 			printf(")");
 			break;
 		case DH6OPT_SIP_SERVER_A:
-		case DH6OPT_DNS:
+		case DH6OPT_DNS_SERVERS:
 		case DH6OPT_SNTP_SERVERS:
 		case DH6OPT_NIS_SERVERS:
 		case DH6OPT_NISP_SERVERS:
@@ -606,6 +606,7 @@
 			printf(")");
 			break;
 		case DH6OPT_SIP_SERVER_D:
+		case DH6OPT_DOMAIN_LIST:
 			tp = (u_char *)(dh6o + 1);
 			while (tp < ep) {
 				putchar(' ');
diff --git a/tests/TESTLIST b/tests/TESTLIST
index 2be2223..35e2c11 100644
--- a/tests/TESTLIST
+++ b/tests/TESTLIST
@@ -90,6 +90,7 @@
 dhcpv6-ia-ta	dhcpv6-ia-ta.pcap	dhcpv6-ia-ta.out	-t -v
 dhcpv6-ntp-server	dhcpv6-ntp-server.pcap	dhcpv6-ntp-server.out	-t -v
 dhcpv6-sip-server-d	dhcpv6-sip-server-d.pcap	dhcpv6-sip-server-d.out -t -v
+dhcpv6-domain-list	dhcpv6-domain-list.pcap	dhcpv6-domain-list.out	-t -v
 
 # ZeroMQ/PGM tests
 # ZMTP/1.0 over TCP
diff --git a/tests/dhcpv6-domain-list.out b/tests/dhcpv6-domain-list.out
new file mode 100644
index 0000000..965f091
--- /dev/null
+++ b/tests/dhcpv6-domain-list.out
@@ -0,0 +1 @@
+IP6 (hlim 64, next-header UDP (17) payload length: 101) fe80::20c:29ff:fe9b:a15d.547 > fe80::20c:29ff:fe38:f368.546: [udp sum ok] dhcp6 reply (xid=aa56ce (client-ID hwaddr/time type 1 time 418384703 000c2938f368) (server-ID hwaddr/time type 1 time 418354459 000c299ba153) (DNS-search-list example.com. sales.example.com. eng.example.com.)
diff --git a/tests/dhcpv6-domain-list.pcap b/tests/dhcpv6-domain-list.pcap
new file mode 100644
index 0000000..b0afeff
--- /dev/null
+++ b/tests/dhcpv6-domain-list.pcap
Binary files differ