mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 10:04:05 +08:00
DHCPv6: client-id/server-id DUID type 2 correction
Explicitly print the enterprise as it is a separate field per RFC8415, and allow variable lengths. Add a test file.
This commit is contained in:
parent
34a534f50d
commit
46c1b8d227
@ -336,9 +336,9 @@ dhcp6opt_print(netdissect_options *ndo,
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (optlen >= 2 + 8) {
|
||||
ND_PRINT(" vid ");
|
||||
for (i = 2; i < 2 + 8; i++)
|
||||
if (optlen >= 2 + 4) {
|
||||
ND_PRINT(" enterprise %u ", GET_BE_U_4(tp + 2));
|
||||
for (i = 2 + 4; i < optlen; i++)
|
||||
ND_PRINT("%02x",
|
||||
GET_U_1(tp + i));
|
||||
/*(*/
|
||||
|
@ -911,6 +911,7 @@ various_gre various_gre.pcap various_gre.out -v
|
||||
|
||||
# DHCP ZTP(RFC5970) and SZTP(RFC8572) tests
|
||||
dhcpv4v6-rfc5970-rfc8572 dhcpv4v6-rfc5970-rfc8572.pcap dhcpv4v6-rfc5970-rfc8572.out -vv
|
||||
dhcpv6-rfc8415-duid-type2 dhcpv6-rfc8415-duid-type2.pcap dhcpv6-rfc8415-duid-type2.out -v
|
||||
|
||||
# NHRP tests
|
||||
ios_nhrp ios_nhrp.pcap ios_nhrp.out -v
|
||||
|
1
tests/dhcpv6-rfc8415-duid-type2.out
Normal file
1
tests/dhcpv6-rfc8415-duid-type2.out
Normal file
@ -0,0 +1 @@
|
||||
1 16:59:07.188393 IP6 (flowlabel 0x38898, hlim 1, next-header UDP (17) payload length: 155) fe80::200:1ff:fe01:0.546 > ff02::1:2.547: [udp sum ok] dhcp6 request (xid=e4a4a3 (vendor-specific-info) (client-ID enterprise 30065 4853483134343235313438) (server-ID hwaddr/time type 1 time 721155524 828662a1defd) (option-request Bootfile-URL SZTP-redirect DNS-search-list DNS-server) (elapsed-time 0) (user-class Arista) (IA_NA IAID:16842752 T1:3600 T2:5400 (IA_ADDR 1234:5678::4 pltime:7200 vltime:7500)))
|
BIN
tests/dhcpv6-rfc8415-duid-type2.pcap
Normal file
BIN
tests/dhcpv6-rfc8415-duid-type2.pcap
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user