From: Michael Richardson Date: Tue, 30 Apr 2013 16:45:38 +0000 (-0700) Subject: Merge pull request #308 from fxlb/master X-Git-Tag: tcpdump-4.5.0~83 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/6605b906116d248ca31a2d19df555bfb8fa0dcd7?hp=b766ec9d3be6d4103a510ffb18d6497df1e50dc8 Merge pull request #308 from fxlb/master DHCPv6 decoder update --- diff --git a/print-dhcp6.c b/print-dhcp6.c index 9bfe6e70..b317eb4e 100644 --- a/print-dhcp6.c +++ b/print-dhcp6.c @@ -336,7 +336,7 @@ static void dhcp6opt_print(const u_char *cp, const u_char *ep) { struct dhcp6opt *dh6o; - u_char *tp; + const u_char *tp; size_t i; u_int16_t opttype; size_t optlen; @@ -605,6 +605,14 @@ dhcp6opt_print(const u_char *cp, const u_char *ep) printf(" %s", ip6addr_string(&tp[i])); printf(")"); break; + case DH6OPT_SIP_SERVER_D: + tp = (u_char *)(dh6o + 1); + while (tp < ep) { + putchar(' '); + if((tp = ns_nprint(tp, ep)) == NULL) + goto trunc; + } + break; case DH6OPT_STATUS_CODE: if (optlen < 2) { printf(" ?)"); diff --git a/tests/TESTLIST b/tests/TESTLIST index 5c3034f5..2be2223b 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -89,6 +89,7 @@ dhcpv6-ia-na dhcpv6-ia-na.pcap dhcpv6-ia-na.out -t -v dhcpv6-ia-pd dhcpv6-ia-pd.pcap dhcpv6-ia-pd.out -t -v 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 # ZeroMQ/PGM tests # ZMTP/1.0 over TCP diff --git a/tests/dhcpv6-sip-server-d.out b/tests/dhcpv6-sip-server-d.out new file mode 100644 index 00000000..62f8992d --- /dev/null +++ b/tests/dhcpv6-sip-server-d.out @@ -0,0 +1 @@ +IP6 (hlim 64, next-header UDP (17) payload length: 114) fe80::20c:29ff:fe9b:a15d.547 > fe80::20c:29ff:fe38:f368.546: [udp sum ok] dhcp6 reply (xid=6890d8 (client-ID hwaddr/time type 1 time 418384703 000c2938f368) (server-ID hwaddr/time type 1 time 418354459 000c299ba153) (SIP-servers-domain sip1.my-domain.net. sip2.example.com. sip3.sub.my-domain.org.) diff --git a/tests/dhcpv6-sip-server-d.pcap b/tests/dhcpv6-sip-server-d.pcap new file mode 100644 index 00000000..7cb21032 Binary files /dev/null and b/tests/dhcpv6-sip-server-d.pcap differ