From: Francois-Xavier Le Bail Date: Mon, 21 Oct 2019 16:59:34 +0000 (+0200) Subject: ICMP: Add two test capture files X-Git-Tag: tcpdump-4.99-bp~642 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/7e5f5a10ab7ff2235e191d3ff1e568ef5e98f944 ICMP: Add two test capture files These capture files 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 files were updated to avoid pcap_loop() error messages. Update the output of the tests accordingly. Partial update from 1a1bce0526a77b62e41531b00f8bb5e21fd4f3a3 in 4.9 branch. --- diff --git a/tests/TESTLIST b/tests/TESTLIST index b297176f..ce8e0e77 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -606,6 +606,8 @@ ip_ts_opts_asan ip_ts_opts_asan.pcap ip_ts_opts_asan.out -v isakmpv1-attr-oobr isakmpv1-attr-oobr.pcap isakmpv1-attr-oobr.out -v isakmp-ikev1_n_print-oobr isakmp-ikev1_n_print-oobr.pcap isakmp-ikev1_n_print-oobr.out -v ldp-ldp_tlv_print-oobr ldp-ldp_tlv_print-oobr.pcap ldp-ldp_tlv_print-oobr.out -v +icmp-icmp_print-oobr-1 icmp-icmp_print-oobr-1.pcap icmp-icmp_print-oobr-1.out -v +icmp-icmp_print-oobr-2 icmp-icmp_print-oobr-2.pcap icmp-icmp_print-oobr-2.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/icmp-icmp_print-oobr-1.out b/tests/icmp-icmp_print-oobr-1.out new file mode 100644 index 00000000..37cf56e1 --- /dev/null +++ b/tests/icmp-icmp_print-oobr-1.out @@ -0,0 +1,7 @@ + 1 18:01:37.17835523 IP (tos 0x4, ttl 64, id 3584, offset 0, flags [none], proto ICMP (1), length 23, bad cksum a (->1e0f)!) + 22.3.2.0 > 54.209.0.0: ICMP type-#49, length 3 [|icmp] + 2 06:58:21.471597027 IP (tos 0x4, ttl 64, id 32512, offset 0, flags [none], proto VRRP (112), length 31, bad cksum 82 (->db96)!) + 22.3.211.0 > 54.209.0.0: VRRPv3, Advertisement, (ttl 64), vrid 128, prio 69 [|vrrp] + 3 12:37:33.1049347 c0:05:ff:ff:40:9d > 00:0c:02:49:96:7e, ethertype Unknown (0xf1ff), length 65570: + 0x0000: 4404 0020 0e00 0000 4070 000a 1603 0200 D.......@p...... + 0x0010: 36d1 0000 3180 bc 6...1.. diff --git a/tests/icmp-icmp_print-oobr-1.pcap b/tests/icmp-icmp_print-oobr-1.pcap new file mode 100644 index 00000000..a9dd35b4 Binary files /dev/null and b/tests/icmp-icmp_print-oobr-1.pcap differ diff --git a/tests/icmp-icmp_print-oobr-2.out b/tests/icmp-icmp_print-oobr-2.out new file mode 100644 index 00000000..82153ac0 --- /dev/null +++ b/tests/icmp-icmp_print-oobr-2.out @@ -0,0 +1,4 @@ + 1 [Invalid header: len(34) < caplen(35)] + 2 [Invalid header: len==0] + 3 04:59:44.4061069334 IP (tos 0x7f,CE, ttl 254, id 40208, offset 0, flags [none], proto ICMP (1), length 30, options (unknown 201 [bad length 255]), bad cksum 101 (->6470)!) + 1.241.1.250 > 219.91.15.170: ICMP type-#255, length 2 [|icmp] diff --git a/tests/icmp-icmp_print-oobr-2.pcap b/tests/icmp-icmp_print-oobr-2.pcap new file mode 100644 index 00000000..60b7b936 Binary files /dev/null and b/tests/icmp-icmp_print-oobr-2.pcap differ