From: Francois-Xavier Le Bail Date: Wed, 23 Oct 2019 08:01:48 +0000 (+0200) Subject: LMP: Add a test capture file X-Git-Tag: tcpdump-4.99-bp~636 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/ecc156b6db9e2326430e3ff49ad0c5d307ed486a LMP: Add a test capture file This capture file triggered a buffer over-read with the 4.9.2 release fixed in the 4.9.3 release. With the new GET_ macros, the problem no longer exists. Thus no fix needed. The pcap file was updated to pass the sanity checks, keep only the relevant packets and avoid pcap_loop() error messages. Update the output of the test accordingly. Partial update from d97e94223720684c6aa740ff219e0d19426c2220 in 4.9 branch. --- diff --git a/tests/TESTLIST b/tests/TESTLIST index 654cb4e1..df4b61bb 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -613,6 +613,7 @@ vrrp-vrrp_print-oobr vrrp-vrrp_print-oobr.pcap vrrp-vrrp_print-oobr.out -v vrrp-vrrp_print-oobr-2 vrrp-vrrp_print-oobr-2.pcap vrrp-vrrp_print-oobr-2.out -v bgp-bgp_capabilities_print-oobr-1 bgp-bgp_capabilities_print-oobr-1.pcap bgp-bgp_capabilities_print-oobr-1.out -v bgp-bgp_capabilities_print-oobr-2 bgp-bgp_capabilities_print-oobr-2.pcap bgp-bgp_capabilities_print-oobr-2.out -v +lmp-lmp_print_data_link_subobjs-oobr lmp-lmp_print_data_link_subobjs-oobr.pcap lmp-lmp_print_data_link_subobjs-oobr.out -v # The .pcap file is truncated after the 1st packet. hncp_dhcpv6data-oobr hncp_dhcpv6data-oobr.pcap hncp_dhcpv6data-oobr.out -v -c1 hncp_dhcpv4data-oobr hncp_dhcpv4data-oobr.pcap hncp_dhcpv4data-oobr.out -v -c1 diff --git a/tests/lmp-lmp_print_data_link_subobjs-oobr.out b/tests/lmp-lmp_print_data_link_subobjs-oobr.out new file mode 100644 index 00000000..f7b87a64 --- /dev/null +++ b/tests/lmp-lmp_print_data_link_subobjs-oobr.out @@ -0,0 +1,20 @@ + 1 06:58:21.3858891542 IP (tos 0xfd,ECT(1), ttl 254, id 45839, offset 0, flags [+, DF, rsvd], proto UDP (17), length 56871, bad cksum fe07 (->ddf0)!) + 17.8.8.255.701 > 40.184.42.8.12: + LMPv1, msg-type: unknown, type: 249, Flags: [none], length: 212 + Data Link Object (12), Class-Type: Unnumbered (3) Flags: [non-negotiable], length: 20 + Flags: [none] + Local Interface ID: 2435832538 (0x912fdada) + Remote Interface ID: 3657433088 (0xda000000) + Subobject, Type: Interface Switching Type (1), Length: 4 + Switching Type: Unknown (0) + Encoding Type: Unknown (0) [|lmp] + 2 00:02:08.1114902 IP (tos 0xfd,ECT(1), ttl 254, id 45839, offset 0, flags [+, DF, rsvd], proto UDP (17), length 56871, bad cksum fe07 (->ddf0)!) + 17.8.8.255.701 > 40.184.42.8.12: + LMPv1, msg-type: unknown, type: 249, Flags: [none], length: 212 + Data Link Object (12), Class-Type: Unnumbered (3) Flags: [non-negotiable], length: 20 + Flags: [none] + Local Interface ID: 2435832538 (0x912fdada) + Remote Interface ID: 3657433088 (0xda000000) + Subobject, Type: Interface Switching Type (1), Length: 4 + Switching Type: Unknown (0) + Encoding Type: Unknown (0) [|lmp] diff --git a/tests/lmp-lmp_print_data_link_subobjs-oobr.pcap b/tests/lmp-lmp_print_data_link_subobjs-oobr.pcap new file mode 100644 index 00000000..661d9bd7 Binary files /dev/null and b/tests/lmp-lmp_print_data_link_subobjs-oobr.pcap differ