summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2019-10-07 11:05:26 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2019-10-07 11:06:12 +0900
commitb0706e54b48af6c11783f55455842a292c4d9b17 (patch)
treee18f8e347693bf9a1297f5553716e84c9109246f /tests
parentd722eee76c51a65c5449806c6fdacf2ac4f95055 (diff)
parent9ceaf0d786e9465506271e8450248a57719e4eb1 (diff)
downloadtcpdump-b0706e54b48af6c11783f55455842a292c4d9b17.tar.gz
tcpdump-b0706e54b48af6c11783f55455842a292c4d9b17.tar.bz2
tcpdump-b0706e54b48af6c11783f55455842a292c4d9b17.zip
Change-Id: Ib2ce6fe0c63523943f1fe7d772010824fe2c0d41
Diffstat (limited to 'tests')
-rw-r--r--tests/SMBLIST12
-rw-r--r--tests/TESTLIST62
-rwxr-xr-xtests/TESTonce127
-rwxr-xr-xtests/TESTrun.sh69
-rw-r--r--tests/aoe-oobr-1.out3
-rw-r--r--tests/aoe-oobr-1.pcapbin0 -> 1204 bytes
-rw-r--r--tests/arp-too-long-tha.pcapbin180 -> 104 bytes
-rw-r--r--tests/babel_update_oobr.out66
-rw-r--r--tests/babel_update_oobr.pcapbin0 -> 9888 bytes
-rw-r--r--tests/bgp-bgp_capabilities_print-oobr-1.out27
-rw-r--r--tests/bgp-bgp_capabilities_print-oobr-1.pcapbin0 -> 274 bytes
-rw-r--r--tests/bgp-bgp_capabilities_print-oobr-2.out26
-rw-r--r--tests/bgp-bgp_capabilities_print-oobr-2.pcapbin0 -> 274 bytes
-rw-r--r--tests/bgp_mp_reach_nlri-oobr.out277
-rw-r--r--tests/bgp_mp_reach_nlri-oobr.pcapbin0 -> 2789 bytes
-rwxr-xr-xtests/crypto.sh90
-rw-r--r--tests/cve-2018-10105-segv-sflowprint.out2
-rw-r--r--tests/cve-2018-10105-segv-sflowprint.pcapngbin0 -> 954 bytes
-rw-r--r--tests/cve-2018-10105_smbprint-readofsize1.out8
-rw-r--r--tests/cve-2018-10105_smbprint-readofsize1.pcapbin0 -> 880 bytes
-rw-r--r--tests/cve-2018-10105_smbutil_withoutasan.out101
-rw-r--r--tests/cve-2018-10105_smbutil_withoutasan.pcapbin0 -> 880 bytes
-rw-r--r--tests/cve2015-0261-ipv6.out3
-rw-r--r--tests/cve2015-0261-ipv6.out.stderr2
-rw-r--r--tests/dccp_options-oobr.out19
-rw-r--r--tests/dccp_options-oobr.pcapbin0 -> 3298 bytes
-rw-r--r--tests/dns-zlip-1.out2
-rw-r--r--tests/dns-zlip-2.out2
-rw-r--r--tests/dns-zlip-3.out2
-rw-r--r--tests/eapon2.out61
-rw-r--r--tests/eapon2.pcapbin0 -> 7889 bytes
-rw-r--r--tests/esp4.out8
-rw-r--r--tests/frf16_magic_ie-oobr.out2
-rw-r--r--tests/frf16_magic_ie-oobr.pcapbin0 -> 124 bytes
-rw-r--r--tests/hncp_prefix-oobr.out48
-rw-r--r--tests/hncp_prefix-oobr.pcapngbin0 -> 1566 bytes
-rw-r--r--tests/icmp-icmp_print-oobr-1.out7
-rw-r--r--tests/icmp-icmp_print-oobr-1.pcapbin0 -> 1208 bytes
-rw-r--r--tests/icmp-icmp_print-oobr-2.out5
-rw-r--r--tests/icmp-icmp_print-oobr-2.pcapbin0 -> 2514 bytes
-rw-r--r--tests/icmp6_mobileprefix_asan.out2
-rw-r--r--tests/icmp6_nodeinfo_oobr.out2
-rw-r--r--tests/icmpv6.out2
-rw-r--r--tests/icmpv6_opt24-v.out4
-rw-r--r--tests/ieee802.11_meshhdr-oobr.out1
-rw-r--r--tests/ieee802.11_meshhdr-oobr.pcapbin0 -> 867 bytes
-rw-r--r--tests/isakmp-ikev1_n_print-oobr.out8
-rw-r--r--tests/isakmp-ikev1_n_print-oobr.pcapbin0 -> 376 bytes
-rwxr-xr-xtests/isis-seg-fault-1-v.sh21
-rw-r--r--tests/juniper_header-heapoverflow.pcapbin200 -> 122 bytes
-rw-r--r--tests/kday1.out3
-rw-r--r--tests/kday1.out.stderr2
-rw-r--r--tests/kday2.out3
-rw-r--r--tests/kday2.out.stderr2
-rw-r--r--tests/kday3.out3
-rw-r--r--tests/kday3.out.stderr2
-rw-r--r--tests/kday4.out3
-rw-r--r--tests/kday4.out.stderr2
-rw-r--r--tests/kday5.out3
-rw-r--r--tests/kday5.out.stderr2
-rw-r--r--tests/kday6.out3
-rw-r--r--tests/kday6.out.stderr2
-rw-r--r--tests/kday7.out3
-rw-r--r--tests/kday7.out.stderr2
-rw-r--r--tests/kday8.out3
-rw-r--r--tests/kday8.out.stderr2
-rw-r--r--tests/kh-addrfail-001.out2
-rw-r--r--tests/kh-addrfail-001.out.stderr1
-rw-r--r--tests/kh-addrfail-001.pcap3
-rw-r--r--tests/kh-addrfail-002.out2
-rw-r--r--tests/kh-addrfail-002.out.stderr1
-rw-r--r--tests/kh-addrfail-002.pcap3
-rw-r--r--tests/kh-addrfail-003.out2
-rw-r--r--tests/kh-addrfail-003.out.stderr1
-rw-r--r--tests/kh-addrfail-003.pcap3
-rw-r--r--tests/kh-addrfail-004.out2
-rw-r--r--tests/kh-addrfail-004.out.stderr1
-rw-r--r--tests/kh-addrfail-004.pcap3
-rw-r--r--tests/kh-addrfail-005.out2
-rw-r--r--tests/kh-addrfail-005.out.stderr1
-rw-r--r--tests/kh-addrfail-005.pcap3
-rw-r--r--tests/kh-addrfail-006.out2
-rw-r--r--tests/kh-addrfail-006.out.stderr1
-rw-r--r--tests/kh-addrfail-006.pcap3
-rw-r--r--tests/kh-addrfail-007.out2
-rw-r--r--tests/kh-addrfail-007.out.stderr1
-rw-r--r--tests/kh-addrfail-007.pcap3
-rw-r--r--tests/kh-addrfail-008.out2
-rw-r--r--tests/kh-addrfail-008.out.stderr1
-rw-r--r--tests/kh-addrfail-008.pcap3
-rw-r--r--tests/kh-addrfail-009.out2
-rw-r--r--tests/kh-addrfail-009.out.stderr1
-rw-r--r--tests/kh-addrfail-009.pcap3
-rw-r--r--tests/kh-addrfail-010.out2
-rw-r--r--tests/kh-addrfail-010.out.stderr1
-rw-r--r--tests/kh-addrfail-010.pcap3
-rw-r--r--tests/kh-addrfail-011.out2
-rw-r--r--tests/kh-addrfail-011.out.stderr1
-rw-r--r--tests/kh-addrfail-011.pcap3
-rw-r--r--tests/kh-tcpdump-001.out17
-rw-r--r--tests/kh-tcpdump-001.pcapbin0 -> 374 bytes
-rw-r--r--tests/kh-tcpdump-002.out1
-rw-r--r--tests/kh-tcpdump-002.pcapbin0 -> 88 bytes
-rw-r--r--tests/kh-tcpdump-004.pcapbin0 -> 170 bytes
-rw-r--r--tests/l2tp-avp-overflow.out3
-rw-r--r--tests/l2tp-avp-overflow.out.stderr2
-rw-r--r--tests/ldp-ldp_tlv_print-oobr.out6
-rw-r--r--tests/ldp-ldp_tlv_print-oobr.pcapbin0 -> 395 bytes
-rw-r--r--tests/lmp-lmp_print_data_link_subobjs-oobr.out20
-rw-r--r--tests/lmp-lmp_print_data_link_subobjs-oobr.pcapbin0 -> 11547 bytes
-rwxr-xr-xtests/lmp-v.sh22
-rw-r--r--tests/lmpv1_busyloop.out3
-rwxr-xr-xtests/nflog-e.sh18
-rw-r--r--tests/of10_7050sx_bsn-oobr.out16
-rw-r--r--tests/of10_7050sx_bsn-oobr.pcapbin0 -> 279 bytes
-rw-r--r--tests/ospf6_print_lshdr-oobr.out59
-rw-r--r--tests/ospf6_print_lshdr-oobr.pcapngbin0 -> 5492 bytes
-rw-r--r--tests/pcap-invalid-version-1.out3
-rw-r--r--tests/pcap-invalid-version-1.out.stderr1
-rw-r--r--tests/pcap-invalid-version-2.out3
-rw-r--r--tests/pcap-invalid-version-2.out.stderr1
-rw-r--r--tests/pcap-ng-invalid-vers-1.out1
-rw-r--r--tests/pcap-ng-invalid-vers-2.out1
-rw-r--r--tests/pcapng-invalid-vers-1.out2
-rw-r--r--tests/pcapng-invalid-vers-1.out.stderr1
-rw-r--r--tests/pcapng-invalid-vers-1.pcapng (renamed from tests/pcap-ng-invalid-vers-1.pcap)bin260 -> 260 bytes
-rw-r--r--tests/pcapng-invalid-vers-2.out2
-rw-r--r--tests/pcapng-invalid-vers-2.out.stderr1
-rw-r--r--tests/pcapng-invalid-vers-2.pcapng (renamed from tests/pcap-ng-invalid-vers-2.pcap)bin260 -> 260 bytes
-rw-r--r--tests/pktap-heap-overflow.out3
-rw-r--r--tests/pktap-heap-overflow.out.stderr2
-rw-r--r--tests/relts-0x80000000.pcapbin440 -> 344 bytes
-rw-r--r--tests/rpl-19-pickdag.out2
-rw-r--r--tests/rpl-19-pickdagvvv.out2
-rw-r--r--tests/rpl-dao-oobr.out1
-rw-r--r--tests/rpl-dao-oobr.pcapngbin0 -> 264 bytes
-rw-r--r--tests/rsvp-rsvp_obj_print-oobr.out7
-rw-r--r--tests/rsvp-rsvp_obj_print-oobr.pcapbin0 -> 391 bytes
-rw-r--r--tests/rx_serviceid_oobr.out3
-rw-r--r--tests/rx_serviceid_oobr.pcapbin0 -> 2759 bytes
-rw-r--r--tests/smb.sh49
-rw-r--r--tests/smb_print_trans-oobr1.out39
-rw-r--r--tests/smb_print_trans-oobr1.pcapngbin0 -> 2965 bytes
-rw-r--r--tests/smb_print_trans-oobr2.out37
-rw-r--r--tests/smb_print_trans-oobr2.pcapbin0 -> 332 bytes
-rw-r--r--tests/stp-v4-length-sigsegv.pcapbin324 -> 246 bytes
-rw-r--r--tests/tftp-heapoverflow.pcapbin180 -> 88 bytes
-rw-r--r--tests/vrrp-vrrp_print-oobr-2.out20
-rw-r--r--tests/vrrp-vrrp_print-oobr-2.pcapbin0 -> 724 bytes
-rw-r--r--tests/vrrp-vrrp_print-oobr.out6
-rw-r--r--tests/vrrp-vrrp_print-oobr.pcapbin0 -> 3877 bytes
151 files changed, 1395 insertions, 136 deletions
diff --git a/tests/SMBLIST b/tests/SMBLIST
new file mode 100644
index 0000000..10085d2
--- /dev/null
+++ b/tests/SMBLIST
@@ -0,0 +1,12 @@
+# bad packets from Otto Airamo and Antti Levomäki
+nbns-valgrind nbns-valgrind.pcap nbns-valgrind.out -vvv -e
+
+smb_print_trans-oobr1 smb_print_trans-oobr1.pcapng smb_print_trans-oobr1.out -vv -c4
+# bad packets from Philippe Antoine
+smb_print_trans-oobr2 smb_print_trans-oobr2.pcap smb_print_trans-oobr2.out -vv -c1
+
+# CVE-2018-10105 bad packets from Luis Rocha
+cve-2018-10105_smbprint-readofsize1 cve-2018-10105_smbprint-readofsize1.pcap cve-2018-10105_smbprint-readofsize1.out -vvv
+cve-2018-10105_smbutil_withoutasan cve-2018-10105_smbutil_withoutasan.pcap cve-2018-10105_smbutil_withoutasan.out -vvv
+
+
diff --git a/tests/TESTLIST b/tests/TESTLIST
index bc35a7e..eb3052a 100644
--- a/tests/TESTLIST
+++ b/tests/TESTLIST
@@ -26,8 +26,8 @@ bgp_infloop-v bgp-infinite-loop.pcap bgp_infloop-v.out -v
bgp-aigp bgp-aigp.pcap bgp-aigp.out -v
bgp-large-community bgp-large-community.pcap bgp-large-community.out -v
-# EAP tests
-eapon1 eapon1.pcap eapon1.out
+# EAP tests. eapon1.pcap has NBT packets mixed in, eapon2.pcap removes them.
+eapon2 eapon2.pcap eapon2.out
# ESP tests
esp0 02-sunrise-sunset-esp.pcap esp0.out
@@ -198,6 +198,7 @@ of10_s4810-vvvv of10_s4810.pcap of10_s4810-vvvv.out -vvvv
of10_pf5240-vv of10_pf5240.pcap of10_pf5240-vv.out -vv
of10_7050q-v of10_7050q.pcap of10_7050q-v.out -v
of10_7050sx_bsn-vv of10_7050sx_bsn.pcap of10_7050sx_bsn-vv.out -vv
+of10_7050sx_bsn-oobr of10_7050sx_bsn-oobr.pcap of10_7050sx_bsn-oobr.out -v
# GeoNetworking and CALM FAST tests
geonet-calm-fast geonet_and_calm_fast.pcap geonet_and_calm_fast.out -vv
@@ -358,9 +359,9 @@ lisp_ipv6_eid lisp_ipv6.pcap lisp_ipv6.out -v
pcap-invalid-version-1 pcap-invalid-version-1.pcap pcap-invalid-version-1.out
pcap-invalid-version-2 pcap-invalid-version-2.pcap pcap-invalid-version-2.out
-# pcap-ng invalid version (first: version = 0.1 ; second: version = 1.1)
-pcap-ng-invalid-vers-1 pcap-ng-invalid-vers-1.pcap pcap-ng-invalid-vers-1.out
-pcap-ng-invalid-vers-2 pcap-ng-invalid-vers-2.pcap pcap-ng-invalid-vers-2.out
+# pcapng invalid version (first: version = 0.1 ; second: version = 1.1)
+pcapng-invalid-vers-1 pcapng-invalid-vers-1.pcapng pcapng-invalid-vers-1.out
+pcapng-invalid-vers-2 pcapng-invalid-vers-2.pcapng pcapng-invalid-vers-2.out
# NSH over VxLAN-GPE
nsh-over-vxlan-gpe nsh-over-vxlan-gpe.pcap nsh-over-vxlan-gpe.out
@@ -468,8 +469,6 @@ hoobr_nfs_xid_map_enter hoobr_nfs_xid_map_enter.pcap hoobr_nfs_xid_map_enter.
# bad packets from Wilfried Kirsch
slip-bad-direction slip-bad-direction.pcap slip-bad-direction.out -ve
-# bad packets from Otto Airamo and Antti Levomäki
-nbns-valgrind nbns-valgrind.pcap nbns-valgrind.out -vvv -e
arp-oobr arp-oobr.pcap arp-oobr.out -vvv -e
icmp-cksum-oobr-1 icmp-cksum-oobr-1.pcap icmp-cksum-oobr-1.out -vvv -e
icmp-cksum-oobr-2 icmp-cksum-oobr-2.pcap icmp-cksum-oobr-2.out -vvv -e
@@ -551,13 +550,18 @@ radius_attr_asan radius_attr_asan.pcap radius_attr_asan.out -v
ospf6_decode_v3_asan ospf6_decode_v3_asan.pcap ospf6_decode_v3_asan.out -v
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
-# The case below depends on the bug in print-hncp.c, which at the time of
-# discovery had codepoints for DHCPv6-Data and DHCPv4-Data swapped around.
-# After the bugfix the output will be different because of the different
-# code path and will not test the vulnerability unless modified respectively.
+isakmp-ikev1_n_print-oobr isakmp-ikev1_n_print-oobr.pcap isakmp-ikev1_n_print-oobr.out -v -c3
+ldp-ldp_tlv_print-oobr ldp-ldp_tlv_print-oobr.pcap ldp-ldp_tlv_print-oobr.out -v -c1
+icmp-icmp_print-oobr-1 icmp-icmp_print-oobr-1.pcap icmp-icmp_print-oobr-1.out -v -c3
+icmp-icmp_print-oobr-2 icmp-icmp_print-oobr-2.pcap icmp-icmp_print-oobr-2.out -v -c3
+rsvp-rsvp_obj_print-oobr rsvp-rsvp_obj_print-oobr.pcap rsvp-rsvp_obj_print-oobr.out -v -c3
+vrrp-vrrp_print-oobr vrrp-vrrp_print-oobr.pcap vrrp-vrrp_print-oobr.out -v -c3
+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 -c1
+bgp-bgp_capabilities_print-oobr-2 bgp-bgp_capabilities_print-oobr-2.pcap bgp-bgp_capabilities_print-oobr-2.out -v -c1
+lmp-lmp_print_data_link_subobjs-oobr lmp-lmp_print_data_link_subobjs-oobr.pcap lmp-lmp_print_data_link_subobjs-oobr.out -v -c2
# The .pcap file is truncated after the 1st packet.
hncp_dhcpv6data-oobr hncp_dhcpv6data-oobr.pcap hncp_dhcpv6data-oobr.out -v -c1
-# Same comments apply to the case below.
hncp_dhcpv4data-oobr hncp_dhcpv4data-oobr.pcap hncp_dhcpv4data-oobr.out -v -c1
vqp-oobr vqp-oobr.pcap vqp-oobr.out -v -c1
bgp_pmsi_tunnel-oobr bgp_pmsi_tunnel-oobr.pcap bgp_pmsi_tunnel-oobr.out -v -c1
@@ -576,6 +580,10 @@ olsr-oobr-1 olsr-oobr-1.pcap olsr-oobr-1.out -v
olsr-oobr-2 olsr-oobr-2.pcap olsr-oobr-2.out -v
ikev1_id_ipv6_addr_subnet-oobr ikev1_id_ipv6_addr_subnet-oobr.pcap ikev1_id_ipv6_addr_subnet-oobr.out -v
isakmp-various-oobr isakmp-various-oobr.pcap isakmp-various-oobr.out -v
+aoe-oobr-1 aoe-oobr-1.pcap aoe-oobr-1.out -v -c1
+frf16_magic_ie-oobr frf16_magic_ie-oobr.pcap frf16_magic_ie-oobr.out -v -c1
+rx_serviceid_oobr rx_serviceid_oobr.pcap rx_serviceid_oobr.out -c3
+bgp_mp_reach_nlri-oobr bgp_mp_reach_nlri-oobr.pcap bgp_mp_reach_nlri-oobr.out -v -c1
# bad packets from Katie Holly
mlppp-oobr mlppp-oobr.pcap mlppp-oobr.out
@@ -586,6 +594,16 @@ icmp6_nodeinfo_oobr icmp6_nodeinfo_oobr.pcap icmp6_nodeinfo_oobr.out
# bad packets from Henri Salo
rx_ubik-oobr rx_ubik-oobr.pcap rx_ubik-oobr.out -c1
+babel_update_oobr babel_update_oobr.pcap babel_update_oobr.out -c 52
+
+# bad packets from Junjie Wang
+ospf6_print_lshdr-oobr ospf6_print_lshdr-oobr.pcapng ospf6_print_lshdr-oobr.out -vv -c15
+rpl-dao-oobr rpl-dao-oobr.pcapng rpl-dao-oobr.out -vv -c1
+hncp_prefix-oobr hncp_prefix-oobr.pcapng hncp_prefix-oobr.out -vvv
+
+# bad packets from Ryan Ackroyd
+ieee802.11_meshhdr-oobr ieee802.11_meshhdr-oobr.pcap ieee802.11_meshhdr-oobr.out -H -c1
+dccp_options-oobr dccp_options-oobr.pcap dccp_options-oobr.out -vv -c8
# RTP tests
# fuzzed pcap
@@ -603,3 +621,23 @@ nfs-seg-fault-1 nfs-seg-fault-1.pcap nfs-seg-fault-1.out
dns-zlip-1 dns-zlip-1.pcap dns-zlip-1.out
dns-zlip-2 dns-zlip-2.pcap dns-zlip-2.out
dns-zlip-3 dns-zlip-3.pcap dns-zlip-3.out
+
+# CVE-2019-15120
+kh-addrfail-001 kh-addrfail-001.pcap kh-addrfail-001.out
+kh-addrfail-002 kh-addrfail-002.pcap kh-addrfail-002.out
+kh-addrfail-003 kh-addrfail-003.pcap kh-addrfail-003.out
+kh-addrfail-004 kh-addrfail-004.pcap kh-addrfail-004.out
+kh-addrfail-005 kh-addrfail-005.pcap kh-addrfail-005.out
+kh-addrfail-006 kh-addrfail-006.pcap kh-addrfail-006.out
+kh-addrfail-007 kh-addrfail-007.pcap kh-addrfail-007.out
+kh-addrfail-008 kh-addrfail-008.pcap kh-addrfail-008.out
+kh-addrfail-009 kh-addrfail-009.pcap kh-addrfail-009.out
+kh-addrfail-010 kh-addrfail-010.pcap kh-addrfail-010.out
+kh-addrfail-011 kh-addrfail-011.pcap kh-addrfail-011.out
+kh-tcpdump-001 kh-tcpdump-001.pcap kh-tcpdump-001.out
+kh-tcpdump-002 kh-tcpdump-002.pcap kh-tcpdump-002.out
+
+# CVE-2018-10105 bad packets from Luis Rocha
+cve-2018-10105-segv-sflowprint cve-2018-10105-segv-sflowprint.pcapng cve-2018-10105-segv-sflowprint.out -v
+
+
diff --git a/tests/TESTonce b/tests/TESTonce
index 7026624..425abaa 100755
--- a/tests/TESTonce
+++ b/tests/TESTonce
@@ -1,6 +1,17 @@
#!/usr/bin/env perl
-system("mkdir -p NEW DIFF");
+$TCPDUMP = "./tcpdump";
+if ($^O eq 'MSWin32') {
+ $TCPDUMP = "windump";
+}
+if($ENV{TCPDUMP_BIN}) {
+ $TCPDUMP = $ENV{TCPDUMP_BIN};
+}
+
+use File::Basename;
+use POSIX qw( WEXITSTATUS WIFEXITED);
+
+system("mkdir -p tests/NEW tests/DIFF");
if(@ARGV != 4) {
print "Usage: TESTonce name input output options\n";
@@ -13,39 +24,121 @@ $output=$ARGV[2];
$options=$ARGV[3];
my $r;
+my $debug = 0; # change to suit.
+
+$outputbase = basename($output);
+my $coredump = false;
+my $status = 0;
+my $linecount = 0;
+my $rawstderrlog = "tests/NEW/${outputbase}.raw.stderr";
+my $stderrlog = "tests/NEW/${outputbase}.stderr";
+my $diffstat = 0;
+my $errdiffstat = 0;
+my $cmd;
if ($^O eq 'MSWin32') {
- $r = system "..\\windump -n -t -r $input $options 2>NUL | sed 's/\\r//' | tee NEW/$output | diff $output - >DIFF/$output.diff";
+ $r = system ".\\${TCPDUMP} -t -n -r $input $options 2>NUL | sed 's/\\r//' | tee tests/NEW/${outputbase} | diff $output - >tests/DIFF/${outputbase}.diff";
# need to do same as below for Cygwin.
}
else {
# we used to do this as a nice pipeline, but the problem is that $r fails to
# to be set properly if the tcpdump core dumps.
- $r = system "../tcpdump 2>/dev/null -n -t -r $input $options >NEW/$output";
+ $cmd = "$TCPDUMP 2>${rawstderrlog} -t -n -r $input $options >tests/NEW/${outputbase}";
+ print "CMD: $cmd\n" if $debug;
+ $r = system $cmd;
+ if($r == -1) {
+ # failed to start due to error.
+ $status = $!;
+ }
if($r != 0) {
- # this means tcpdump failed.
- open(OUTPUT, ">>"."NEW/$output") || die "fail to open $output\n";
- printf OUTPUT "EXIT CODE %08x\n", $r;
+ $coredump = false;
+ $status = 0;
+ # this means tcpdump failed, which however, might be expected.
+ open(OUTPUT, ">>"."tests/NEW/${outputbase}") || die "fail to open ${outputbase}\n";
+ if( $r & 128 ) {
+ $coredump = $r & 127;
+ }
+ if( WIFEXITED($r)) {
+ $status = WEXITSTATUS($r);
+ }
+
+ if($coredump || $status) {
+ printf OUTPUT "\nEXIT CODE %08x: dump:%d code: %d\n", $r, $coredump, $status;
+ } else {
+ printf OUTPUT "\nEXIT CODE %08x\n", $r;
+ }
close(OUTPUT);
- $r = 0;
+ $r = 0; # clear the error so that the diff will occur.
+ }
+ print "RUNNING DIFF after ${r}\n" if $debug;
+
+ # always run diff.
+ $cmd = "cat tests/NEW/${outputbase} | diff $output - >tests/DIFF/${outputbase}.diff";
+ print "RUNNING: $cmd\n" if $debug;
+ $r = system $cmd;
+ if(WIFEXITED($r)) {
+ $diffstat = WEXITSTATUS($r);
}
+
+ #system("/bin/sh");
+
+ # process the file, sanitize "reading from" line, and count lines
+ $linecount = 0;
+ open(ERRORRAW, "<" . $rawstderrlog);
+ open(ERROROUT, ">" . $stderrlog);
+ while(<ERRORRAW>) {
+ next if /^\s*$/; # blank lines are boring
+ if(/^(reading from file )(.*)(,.*)$/) {
+ my $filename = basename($2);
+ print ERROROUT "${1}${filename}${3}\n";
+ next;
+ }
+ print ERROROUT;
+ $linecount++;
+ }
+ close(ERROROUT);
+ close(ERRORRAW);
+
+ if ( -f "$output.stderr" ) {
+ $nr = system "cat $stderrlog | diff $output.stderr - >tests/DIFF/$outputbase.stderr.diff";
+ if($r == 0) {
+ $r = $nr;
+ }
+ $errdiffstat = WEXITSTATUS($nr);
+ } else {
+ $errdiffstat = "-"
+ }
+
if($r == 0) {
- $r = system "cat NEW/$output | diff $output - >DIFF/$output.diff";
+ if($linecount == 0 && $status == 0) {
+ print "UNLINK: ${stderrlog}\n" if $debug;
+ unlink($stderrlog) unless $debug;
+ } else {
+ $errdiffstat = "+";
+ }
}
- #print sprintf("END: %08x\n", $r);
+
+ print sprintf("END: %08x\n", $r) if $debug;
}
if($r == 0) {
- printf " %-35s: passed\n", $name;
- unlink "DIFF/$output.diff";
- exit 0;
+ my $stderrlog="";
+ if($linecount > 0 && $errdiffstat != "-") {
+ $stderrlog=sprintf("-- %d lines extra in stderr", $linecount);
+ }
+ if(!defined($ENV{"SKIPPASSED"})) {
+ printf " %-35s: passed%s\n", $name, $stderrlog;
+ }
+ unlink "tests/DIFF/$outputbase.diff" unless $debug;
+ exit 0;
}
-printf " %-35s: TEST FAILED", $name;
-open FOUT, '>>failure-outputs.txt';
-printf FOUT "Failed test: $name\n\n";
+# must have failed!
+printf " %-35s: TEST FAILED(exit core=%d/diffstat=%d,%d/r=%d)", $name, $coredump, $diffstat, $errdiffstat, $r;
+open FOUT, '>>tests/failure-outputs.txt';
+printf FOUT "\nFailed test: $name\n\n";
close FOUT;
-if(-f "DIFF/$output.diff") {
- system "cat DIFF/$output.diff >> failure-outputs.txt";
+if(-f "tests/DIFF/$outputbase.diff") {
+ system "cat tests/DIFF/$outputbase.diff >> tests/failure-outputs.txt";
}
if($r == -1) {
diff --git a/tests/TESTrun.sh b/tests/TESTrun.sh
index 6449082..a7529a5 100755
--- a/tests/TESTrun.sh
+++ b/tests/TESTrun.sh
@@ -1,26 +1,43 @@
#!/bin/sh
-mkdir -p NEW
-mkdir -p DIFF
-passed=0
-failed=0
-cat /dev/null > failure-outputs.txt
+TZ=GMT0; export TZ
+srcdir=${SRCDIR-..}
+
+# make it absolute for later use.
+pwd
+srcdir=`cd $srcdir && pwd`
+
+# this should be run from the compiled build directory,
+# with srcdir= set to wherever the source code is.
+# not from the tests directory.
+echo RUNNING from ${srcdir}
+
+passedfile=`pwd`/tests/.passed
+failedfile=`pwd`/tests/.failed
+failureoutput=`pwd`/tests/failure-outputs.txt
+mkdir -p tests/NEW
+mkdir -p tests/DIFF
+cat /dev/null > ${failureoutput}
runComplexTests()
{
- for i in *.sh
+ for i in ${srcdir}/tests/*.sh
do
- case $i in TEST*.sh) continue;; esac
- sh ./$i
+ case $i in
+ ${srcdir}/tests/TEST*.sh) continue;;
+ ${srcdir}/tests/\*.sh) continue;;
+ esac
+ : echo Running $i
+ (sh $i ${srcdir})
done
+ passed=`cat ${passedfile}`
+ failed=`cat ${failedfile}`
}
runSimpleTests()
{
- passed=`cat .passed`
- failed=`cat .failed`
only=$1
- cat TESTLIST | while read name input output options
+ cat ${srcdir}/tests/TESTLIST | while read name input output options
do
case $name in
\#*) continue;;
@@ -28,23 +45,34 @@ runSimpleTests()
esac
rm -f core
[ "$only" != "" -a "$name" != "$only" ] && continue
- if ./TESTonce $name $input $output "$options"
+ SRCDIR=${srcdir}
+ export SRCDIR
+ # I hate shells with their stupid, useless subshells.
+ passed=`cat ${passedfile}`
+ failed=`cat ${failedfile}`
+ (
+ if ${srcdir}/tests/TESTonce $name ${srcdir}/tests/$input ${srcdir}/tests/$output "$options"
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
fi
+ if [ -d tests/COREFILES ]; then
+ if [ -f core ]; then mv core tests/COREFILES/$name.core; fi
+ fi)
[ "$only" != "" -a "$name" = "$only" ] && break
done
# I hate shells with their stupid, useless subshells.
- passed=`cat .passed`
- failed=`cat .failed`
+ passed=`cat ${passedfile}`
+ failed=`cat ${failedfile}`
}
-echo $passed >.passed
-echo $failed >.failed
+passed=0
+failed=0
+echo $passed >${passedfile}
+echo $failed >${failedfile}
if [ $# -eq 0 ]
then
runComplexTests
@@ -62,8 +90,9 @@ echo '------------------------------------------------'
printf "%4u tests failed\n" $failed
printf "%4u tests passed\n" $passed
echo
-echo
-cat failure-outputs.txt
+if [ -z "$SKIPPASSED" ]; then
+ cat ${failureoutput}
+fi
echo
echo
exit $failed
diff --git a/tests/aoe-oobr-1.out b/tests/aoe-oobr-1.out
new file mode 100644
index 0000000..a959283
--- /dev/null
+++ b/tests/aoe-oobr-1.out
@@ -0,0 +1,3 @@
+AoE length 18, Ver 1, Flags: [Response, MBZ-0x02, MBZ-0x01]
+ Major: 0x40f6, Minor: 0x02, Command: Reserve/Release, Tag: 0x01010101
+ RCmd: Set reserve list, NMacs: 1 [|aoe]
diff --git a/tests/aoe-oobr-1.pcap b/tests/aoe-oobr-1.pcap
new file mode 100644
index 0000000..ce06c21
--- /dev/null
+++ b/tests/aoe-oobr-1.pcap
Binary files differ
diff --git a/tests/arp-too-long-tha.pcap b/tests/arp-too-long-tha.pcap
index f773974..e076962 100644
--- a/tests/arp-too-long-tha.pcap
+++ b/tests/arp-too-long-tha.pcap
Binary files differ
diff --git a/tests/babel_update_oobr.out b/tests/babel_update_oobr.out
new file mode 100644
index 0000000..03fb9dd
--- /dev/null
+++ b/tests/babel_update_oobr.out
@@ -0,0 +1,66 @@
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O^O^O^O^O^DM-2M-!M-1M-1M-1M-1M-1M-1M-1M-1M-,.M-0^Vn [|kerberos]
+IP 10.0.0.1 > 0.234.154.214: ip-proto-17
+IP 10.0.0.1.88 > 0.234.154.179.24191: v4 be KDC_REQUEST: ^O^O^O^O^O^DM-2 .*^C@>M-z}M-uM-tM-+M-_M-{S^PM-=OM-^Y [|kerberos]
+58:5e:0a:02:f4:0a > 02:8e:00:50:6a:e1, ethertype Unknown (0xb104), length 3892667167:
+ 0x0000: 020f 0f0f 0f0f 0f0f 0f0f 04b2 a1b1 b1b1 ................
+ 0x0010: b1b1 b1b1 b158 5e0a 02f4 0ab1 0402 0f0f .....X^.........
+ 0x0020: ff80 0f0f 0f0f 0f00 80a1 00b2 b2b2 b20d ................
+ 0x0030: 0d3a 3400 0001 00 .:4....
+IP 6.3.218.255.6379 > 0.1.31.99.639: Flags [S.UW], seq 2751463404:2751463426, ack 1006637056, win 45746, urg 25778, length 22: RESP [|RESP]
+IP 6.3.208.255.6379 > 0.1.31.99.639: Flags [S.UW], seq 2751463404:2751463426, ack 1006640128, win 45746, urg 25778, length 22: RESP "M-2M-2M-2M-2M-2M-7dM-2M-2M-2M-2M-2" [|RESP]
+IP 208.21.10.1.654 > 31.99.100.232.80: aodv rrep 34 prefix 4 hops 11
+ dst 237.34.38.84 dseq 32203525 src 232.11.2.0 67108864 ms
+ ext 0 0
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O^O^O^O^O^DM-WM-WM-WM-WM-WM-WM-W.@ 680min [|kerberos]
+IP 10.0.253.1.88 > 0.234.154.214.24073: v4 be KDC_REQUEST: .M-^?M-^?^AM-^@M-^?M-^@M-V@M-WM-WM-sM-WM-WM-WM-WM-W 880min ^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?.d^O^O^O^O^O^O^O^O^O^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24073: v4 be KDC_REQUEST: .M-^?M-^?^AM-^@M-^?M-^@M-V@M-WM-WM-sM-WM-WM-WM-WM-W 880min ^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?.d^O^O^O^O^O^O^O^O^O^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-2M-!^BM-W^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 10.0.242.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O'^O^O@@.@^Qjp^J@ 1070min .X^^J^B [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O^U.@^O^D^O^O^O^O^O^O^O^O^O^O^O^O [|kerberos]
+IP 10.0.222.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O^DM-2 .M-g^C@>M-y}M-uM-tM-+M-` 680min [|kerberos]
+01:01:ed:83:e3:ff > 02:8e:00:50:6d:e1, ethertype Unknown (0x0700), length 3892672031:
+ 0x0000: 4508 8834 d940 4000 4011 4a70 0a00 0001 E..4.@@.@.Jp....
+ 0x0010: 00ea 9ad6 0058 5e0a 02f4 0ab1 0402 0f0f .....X^.........
+ 0x0020: 0f0f 0f0f 0f0f 0f04 b2a1 b1b1 b1b1 b1b1 ................
+ 0x0030: b1b1 b100 b016 6e ......n
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O^U.@ ^D^R^O^O^O^O^O^O^O^O^O^O^O [|kerberos]
+IP 10.0.255.127.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O^DM-2 .M-g^C@>M-z}M-uM-tM-^\M-`^VM-^?^?M-=OM-^Y [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O.^B^O^O^O^O^DM-2M-!M-1M-1M-1M-1M-1M-1M-1M-1M-1M-^@M-0^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?M-^@^D^O^O^O^O^O^P.M-^?M-^?^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-#M-^?M-^?d^O^O^O^O^O^O^O^O^O^O^O^O@^VM-^H [|kerberos]
+IP 0.0.1.0 > 234.154.214.0: ip-proto-106
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?M-^@^D^O^O^O^O^O^P.M-^?M-^?^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-^@M-^?M-^?M-^?^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O^O^O^O^O^DM-WM-WM-WM-WM-WM-WM-W.@ 680min [|kerberos]
+IP 10.0.253.1.8280 > 0.234.154.214.24073: UDP, bad length 60652 > 32792
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?.d^O^O^O^O^O^O^O^O^O^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-2M-!^BM-W^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O'^O^O@@.@^Qjp^J@ 1070min .X^^J^B [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 le APPL_REQUEST_MUTUAL: (unknown)
+01:00:01:00:00:00 > 02:8e:00:50:6a:e1, ethertype Unknown (0x08e8), length 3892667167:
+ 0x0000: 4408 8034 d92b 4000 4011 3b70 0a00 0001 D..4.+@.@.;p....
+ 0x0010: 00ea 9ad6 0058 5e0a 02f4 0ab1 0402 ffff .....X^.........
+ 0x0020: ff7f 80ff 80d6 00c3 0880 34d9 4040 0040 ..........4.@@.@
+ 0x0030: 114a 700a 0016 88 .Jp....
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: .M-oM-^?M-^?@M-^?M-^@M-V M-WM-WM-WM-WM-WM-WM-WM-W 0min ^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.210.24073: v4 be KDC_REQUEST: .M-^?M-^?^AM-^@M-^?M-^@M-V@M-WM-WM-sM-WM-WM-WM-WM-W 880min ^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?.d^O^O^O^O^O^O^O^O^O^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-2M-!^BM-WM-^?M-!^B^O^O^P@M-^?M-^?^O^O^O [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-#M-^?M-^?d^O^O^O^O^O^O^O^O^O^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-2M-!^BM-W^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074:
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-^@M-^?M-^?M-^?^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074:
+IP 10.0.253.1.88 > 0.234.154.214.24073: v4 be KDC_REQUEST: .M-^?M-^?^AM-^@M-^?M-^@M-V@M-WM-WM-sM-WM-WM-WM-WM-W 880min ^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?.d^O^O^O^O^O^O^O^O^O^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-2M-!^BM-W^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O'^O^O@@.@^Qjp^J@ 1070min .X^^J^B [|kerberos]
+IP 64.0.0.1.88 > 0.234.154.214.24074: v4 le APPL_REQUEST_MUTUAL: (unknown)
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: M-^?M-^?M-^?^?M-^@M-^?M-^@M-V.M-C^HM-^@4M-Y@@@@^QJp^J [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: .M-oM-^?M-^?@M-^?M-^@M-V 75min ^O^O^O^O^O^O^O^O.^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-2M-!^BM-W^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O^O7M-^@M-^?M-^@^D^O^O^O^O^O^P.M-^?M-^?^O^O^O@^VM-^H [|kerberos]
+IP 10.0.0.1.88 > 0.234.154.214.24074: v4 be KDC_REQUEST: ^O^O^O^O.^DM-^@M-^?M-^?M-^?^CM-!^B@^D 0min ^P.^VM-^H [|kerberos]
+IP 208.21.42.58.6697 > 110.228.104.254.30952: babel 2 (2056) (invalid)
diff --git a/tests/babel_update_oobr.pcap b/tests/babel_update_oobr.pcap
new file mode 100644
index 0000000..2406c04
--- /dev/null
+++ b/tests/babel_update_oobr.pcap
Binary files differ
diff --git a/tests/bgp-bgp_capabilities_print-oobr-1.out b/tests/bgp-bgp_capabilities_print-oobr-1.out
new file mode 100644
index 0000000..48cd19d
--- /dev/null
+++ b/tests/bgp-bgp_capabilities_print-oobr-1.out
@@ -0,0 +1,27 @@
+IP (tos 0x1f,CE, ttl 254, id 38671, offset 0, flags [+, DF, rsvd], proto TCP (6), length 4135, bad cksum 200 (->1fdd)!)
+ 226.219.0.0.179 > 16.233.34.0.100: Flags [SPUE], seq 347537408:347541483, win 511, urg 65535, options [eol], length 4075: BGP [|BGP]
+ Open Message (1), length: 59
+ Version 255, my AS 65528, Holdtime 4324s, ID 144.8.32.4
+ Optional parameters, length: 29
+ Option Unknown (0), length: 0
+ no decoder for option 0
+ Option Capabilities Advertisement (2), length: 8
+ Graceful Restart (64), length: 0
+ Restart Flags: [none], Restart Time 0s
+ Unknown (0), length: 0
+ no decoder for Capability 0
+ 32-Bit AS Number (65), length: 4
+ 4 Byte AS 2
+ Option Unknown (0), length: 2
+ no decoder for option 0
+ Option Capabilities Advertisement (2), length: 2
+ Unknown (232), length: 3
+ no decoder for Capability 232
+ 0x0000: 0207 04
+ Option Capabilities Advertisement (2), length: 7
+ Multiple Routes to a Destination (4), length: 0
+ no decoder for Capability 4
+ Unknown (8), length: 0
+ no decoder for Capability 8
+ Route Refresh (Cisco) (128), length: 0
+ Graceful Restart (64), length: 0[|BGP]
diff --git a/tests/bgp-bgp_capabilities_print-oobr-1.pcap b/tests/bgp-bgp_capabilities_print-oobr-1.pcap
new file mode 100644
index 0000000..61a5351
--- /dev/null
+++ b/tests/bgp-bgp_capabilities_print-oobr-1.pcap
Binary files differ
diff --git a/tests/bgp-bgp_capabilities_print-oobr-2.out b/tests/bgp-bgp_capabilities_print-oobr-2.out
new file mode 100644
index 0000000..21de6f9
--- /dev/null
+++ b/tests/bgp-bgp_capabilities_print-oobr-2.out
@@ -0,0 +1,26 @@
+IP (tos 0x1f,CE, ttl 254, id 38671, offset 0, flags [+, DF, rsvd], proto TCP (6), length 4135, bad cksum 200 (->1fdd)!)
+ 226.219.0.0.179 > 16.233.34.0.100: Flags [SPUE], seq 347537408:347541483, win 511, urg 65535, options [eol], length 4075: BGP [|BGP]
+ Open Message (1), length: 59
+ Version 255, my AS 65528, Holdtime 4324s, ID 144.8.32.4
+ Optional parameters, length: 29
+ Option Unknown (0), length: 0
+ no decoder for option 0
+ Option Capabilities Advertisement (2), length: 8
+ Graceful Restart (64), length: 0
+ Restart Flags: [none], Restart Time 0s
+ Unknown (0), length: 0
+ no decoder for Capability 0
+ 32-Bit AS Number (65), length: 4
+ 4 Byte AS 2
+ Option Unknown (0), length: 2
+ no decoder for option 0
+ Option Capabilities Advertisement (2), length: 2
+ Unknown (232), length: 3
+ no decoder for Capability 232
+ 0x0000: 0207 04
+ Option Capabilities Advertisement (2), length: 7
+ Multiple Routes to a Destination (4), length: 0
+ no decoder for Capability 4
+ Unknown (8), length: 0
+ no decoder for Capability 8
+ Multiprotocol Extensions (1), length: 0[|BGP]
diff --git a/tests/bgp-bgp_capabilities_print-oobr-2.pcap b/tests/bgp-bgp_capabilities_print-oobr-2.pcap
new file mode 100644
index 0000000..5c2e1d2
--- /dev/null
+++ b/tests/bgp-bgp_capabilities_print-oobr-2.pcap
Binary files differ
diff --git a/tests/bgp_mp_reach_nlri-oobr.out b/tests/bgp_mp_reach_nlri-oobr.out
new file mode 100644
index 0000000..df68625
--- /dev/null
+++ b/tests/bgp_mp_reach_nlri-oobr.out
@@ -0,0 +1,277 @@
+IP (tos 0xff,CE, ttl 254, id 32783, offset 0, flags [rsvd], proto TCP (6), length 65535, bad cksum 8e15 (->5bbf)!)
+ 241.0.128.39.179 > 239.0.0.1.0: Flags [none], seq 4144029695:4144095150, win 65535, options [eol], length 65455: BGP [|BGP]
+ Update Message (2), length: 45
+ Withdrawn routes: 3 bytes
+ Attribute Set (128), length: 32768, Flags [OTPE+f]: [|BGP] [|BGP]
+ Update Message (2), length: 45
+ Withdrawn routes: 3 bytes
+ Attribute Set (128), length: 7, Flags [OTPE+f]:
+ Origin AS: 0
+ Multi-Protocol Reach NLRI (14), length: 227, Flags [T+6]:
+ AFI: NSAP (3), SAFI: labeled VPN Unicast (128)
+ nexthop: invalid len, nh-length: 1, no SNPA
+ RD: unknown RD format, 00.0000.0000.0d00.0000.0000.00/91, label:15 (bottom)
+ (illegal prefix length)
+ Multi-Protocol Reach NLRI (14), length: 227, Flags [T+6]:
+ AFI: NSAP (3), SAFI: labeled VPN Unicast (128)
+ nexthop: RD: unknown RD format, 05.0000.0000.0000.0000.000d.0000, nh-length: 21, no SNPA
+ (illegal prefix length)
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (80), length: 0
+ no Attribute 80 decoder
+ Unknown Attribute (157), length: 161, Flags [P+d]:
+ no Attribute 157 decoder
+ 0x0000: 0280 fdff ffff ffff ffff ffff ffff ffff
+ 0x0010: ffff ff00 2d02 0003 f1ff 7bc3 b2ff 8000
+ 0x0020: 0700 0000 df00 c123 0000 0000 00a1 0200
+ 0x0030: 9eff ffff ffff ffff ffff ffff ffff ff94
+ 0x0040: 9494 2d02 0003 f1ff 7bc3 b2ff 8000 0700
+ 0x0050: 0000 0046 0ee3 0003 8015 00b3 0000 f700
+ 0x0060: dfee 0500 0000 0000 0000 0000 0000 0000
+ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0080: 0000 de00 0000 0000 0000 0000 0000 0001
+ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x00a0: 00
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 140
+ no Attribute 0 decoder
+ 0x0000: 0000 0000 0000 0080 27ef 0000 0100 c600
+ 0x0010: 007f f3f9 8900 0107 07d4 2d9d a102 80fd
+ 0x0020: ecff ff04 00ff 4000 0000 ffff ffff ffff
+ 0x0030: 002d 0200 03f1 ff7b c3b2 ff80 0007 434c
+ 0x0040: 4945 4e54 0000 00df 00c1 2300 0000 0000
+ 0x0050: ff00 0000 ff00 0000 04ff ffff ffff ffff
+ 0x0060: ffff ffff 002d 0200 03f1 ff7b c3b2 ff80
+ 0x0070: 0007 0000 0000 460e e300 0380 1500 b300
+ 0x0080: 00f7 00df ee35 0000 0500 0000
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder[|BGP] [|BGP]
+ Update Message (2), length: 45
+ Withdrawn routes: 3 bytes
+ Attribute Set (128), length: 7, Flags [OTPE+f]:
+ Origin AS: 223
+ Unknown Attribute (193), length: 35
+ no Attribute 193 decoder
+ 0x0000: 0000 0000 00a1 0200 9eff ffff ffff fffc
+ 0x0010: ffff ffff ffff ffff ff00 2d02 0003 f1ff
+ 0x0020: 7bc3 b2
+ Attribute Set (128), length: 7, Flags [OTPE+f]:
+ Origin AS: 0
+ Multi-Protocol Reach NLRI (14), length: 227, Flags [T+6]:
+ AFI: NSAP (3), SAFI: labeled VPN Unicast (128)
+ nexthop: RD: unknown RD format, 05.0000.0000.0000.0000.000d.0000, nh-length: 21, no SNPA
+ (illegal prefix length)
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (80), length: 0
+ no Attribute 80 decoder
+ Unknown Attribute (157), length: 161, Flags [P+d]:
+ no Attribute 157 decoder
+ 0x0000: 0280 fdff ffff ffff ffff ffff ffff ffff
+ 0x0010: ffff ff00 2d02 0003 f1ff 7bc3 b2ff 8000
+ 0x0020: 0700 0000 df00 c123 0000 0000 00a1 0200
+ 0x0030: 9eff ffff ffff ffff ffff ffff ffff ff94
+ 0x0040: 9494 2d02 0003 f1ff 7bc3 b2ff 8000 0700
+ 0x0050: 0000 0046 0ee3 0003 8015 00b3 0000 f700
+ 0x0060: dfee 0500 0000 0000 0000 0000 0000 0000
+ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0080: 0000 de00 0000 0000 0000 0000 0000 0001
+ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x00a0: 00
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 140
+ no Attribute 0 decoder
+ 0x0000: 0000 0000 0000 0080 27ef 0000 0100 c600
+ 0x0010: 007f f3f9 8900 0107 07d4 2d9d a102 80fd
+ 0x0020: ecff ff04 00ff 4000 0000 ffff ffff ffff
+ 0x0030: 002d 0200 03f1 ff7b c3b2 ff80 0007 434c
+ 0x0040: 4945 4e54 0000 00df 00c1 2300 0000 0000
+ 0x0050: ff00 0000 ff00 0000 04ff ffff ffff ffff
+ 0x0060: ffff ffff 002d 0200 03f1 ff7b c3b2 ff80
+ 0x0070: 0007 0000 0000 460e e300 0380 1500 b300
+ 0x0080: 00f7 00df ee35 0000 0500 0000
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder[|BGP] [|BGP]
+ Update Message (2), length: 45
+ Withdrawn routes: 3 bytes
+ Attribute Set (128), length: 7, Flags [OTPE+f]:
+ Origin AS: 223
+ Unknown Attribute (193), length: 35
+ no Attribute 193 decoder
+ 0x0000: 0000 0000 00a1 0200 0aff ffff ffff ffff
+ 0x0010: ffff ffff ffff ffff ff00 2d02 0003 f1ff
+ 0x0020: 7bc3 b2
+ Unknown Attribute (241), length: 255, Flags [+3]:
+ no Attribute 241 decoder
+ 0x0000: 7bc3 b2ff 8000 0700 0000 0046 0ee3 0003
+ 0x0010: 8001 00b3 0000 f700 dfee 0500 0000 0000
+ 0x0020: 0000 0000 0d00 0000 0000 0000 0000 0000
+ 0x0030: 0000 0000 0000 00ff 8000 0700 0000 0046
+ 0x0040: 0ee3 0003 8015 00cd 0000 f700 dfee 0500
+ 0x0050: 0000 0000 0000 0000 1b00 0000 fff5 0000
+ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0070: 0000 0000 0000 0000 5000 2d9d a102 80fd
+ 0x0080: ffff ffff ffff ffff ffff ffff ffff ffff
+ 0x0090: 002d 0200 03f1 ff7b c3b2 ff80 0007 0000
+ 0x00a0: 00df 00c1 2300 0000 0000 a102 009e ffff
+ 0x00b0: ffff ffff ffff ffff ffff ffff 9494 942d
+ 0x00c0: 0200 03f1 ff7b c3b2 ff80 0007 0000 0000
+ 0x00d0: 460e e300 0380 1500 b300 00f7 00df ee05
+ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 00
+ Unknown Attribute (0), length: 0, Flags [OTE+e]:
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0, Flags [+1]:
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 140
+ no Attribute 0 decoder
+ 0x0000: 0000 0000 0000 0080 27ef 0000 0100 c600
+ 0x0010: 007f f3f9 8900 0107 07d4 2d9d a102 80fd
+ 0x0020: ecff ff04 00ff 4000 0000 ffff ffff ffff
+ 0x0030: 002d 0200 03f1 ff7b c3b2 ff80 0007 434c
+ 0x0040: 4945 4e54 0000 00df 00c1 2300 0000 0000
+ 0x0050: ff00 0000 ff00 0000 04ff ffff ffff ffff
+ 0x0060: ffff ffff 002d 0200 03f1 ff7b c3b2 ff80
+ 0x0070: 0007 0000 0000 460e e300 0380 1500 b300
+ 0x0080: 00f7 00df ee35 0000 0500 0000
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder
+ Unknown Attribute (0), length: 0
+ no Attribute 0 decoder[|BGP] [|BGP]
+ Update Message (2), length: 45
+ Withdrawn routes: 3 bytes
+ Unknown Attribute (241), length: 255, Flags [+3]: [|BGP] [|BGP]
+ Update Message (2), length: 45
+ Withdrawn routes: 3 bytes
+ Attribute Set (128), length: 7, Flags [OTPE+f]:
+ Origin AS: 223
+ Unknown Attribute (193), length: 35
+ no Attribute 193 decoder
+ 0x0000: 0000 0000 00a1 0200 9eff ffff ffff ffff
+ 0x0010: ffff ffff ffff ff94 9494 2d02 0003 f1ff
+ 0x0020: 7bc3 b2
+ Attribute Set (128), length: 7, Flags [OTPE+f]:
+ Origin AS: 0
+ Multi-Protocol Reach NLRI (14), length: 227, Flags [T+6]:
+ AFI: NSAP (3), SAFI: labeled VPN Unicast (128)
+ nexthop: RD: unknown RD format, 05.0000.0000.0000.0000.0000.0000, nh-length: 21, no SNPA
+ (illegal prefix length)
+ Attribute Set (128), length: 7, Flags [OTPE+f]:
+ Origin AS: 0
+ Multi-Protocol Reach NLRI (14), length: 227, Flags [T+6]:
+ AFI: NSAP (3), SAFI: labeled VPN Unicast (128)
+ nexthop: RD: unknown RD format, 35.0000.0500.0000.0000.0000.0000, nh-length: 21, no SNPA
+ (illegal prefix length)[|BGP]
diff --git a/tests/bgp_mp_reach_nlri-oobr.pcap b/tests/bgp_mp_reach_nlri-oobr.pcap
new file mode 100644
index 0000000..dc0b57f
--- /dev/null
+++ b/tests/bgp_mp_reach_nlri-oobr.pcap
Binary files differ
diff --git a/tests/crypto.sh b/tests/crypto.sh
index 16a2855..558e660 100755
--- a/tests/crypto.sh
+++ b/tests/crypto.sh
@@ -1,42 +1,52 @@
#!/bin/sh
+srcdir=${1-..}
+: echo crypto.sh using ${srcdir} from `pwd`
+
+SRCDIR=$srcdir
+export SRCDIR
+
+testdir=${srcdir}/tests
+
exitcode=0
+passedfile=tests/.passed
+failedfile=tests/.failed
+passed=`cat ${passedfile}`
+failed=`cat ${failedfile}`
# Only attempt OpenSSL-specific tests when compiled with the library.
-if grep '^#define HAVE_LIBCRYPTO 1$' ../config.h >/dev/null
+if grep '^#define HAVE_LIBCRYPTO 1$' config.h >/dev/null
then
- passed=`cat .passed`
- failed=`cat .failed`
- if ./TESTonce esp1 02-sunrise-sunset-esp.pcap esp1.out '-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
+ if ${testdir}/TESTonce esp1 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out '-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce esp2 08-sunrise-sunset-esp2.pcap esp2.out '-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"'
+ if ${testdir}//TESTonce esp2 ${testdir}/08-sunrise-sunset-esp2.pcap ${testdir}/esp2.out '-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce esp3 02-sunrise-sunset-esp.pcap esp1.out '-E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
+ if ${testdir}/TESTonce esp3 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out '-E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
# Reading the secret(s) from a file does not work with Capsicum.
- if grep '^#define HAVE_CAPSICUM 1$' ../config.h >/dev/null
+ if grep '^#define HAVE_CAPSICUM 1$' config.h >/dev/null
then
FORMAT=' %-35s: TEST SKIPPED (compiled w/Capsicum)\n'
printf "$FORMAT" esp4
@@ -45,68 +55,68 @@ then
printf "$FORMAT" ikev2pI2
printf "$FORMAT" isakmp4
else
- if ./TESTonce esp4 08-sunrise-sunset-esp2.pcap esp2.out '-E "file esp-secrets.txt"'
+ if ${testdir}/TESTonce esp4 ${testdir}/08-sunrise-sunset-esp2.pcap ${testdir}/esp4.out '-E "file '${testdir}'/esp-secrets.txt"'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce esp5 08-sunrise-sunset-aes.pcap esp5.out '-E "file esp-secrets.txt"'
+ if ${testdir}/TESTonce esp5 ${testdir}/08-sunrise-sunset-aes.pcap ${testdir}/esp5.out '-E "file '${testdir}'/esp-secrets.txt"'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce espudp1 espudp1.pcap espudp1.out '-nnnn -E "file esp-secrets.txt"'
+ if ${testdir}/TESTonce espudp1 ${testdir}/espudp1.pcap ${testdir}/espudp1.out '-nnnn -E "file '${testdir}'/esp-secrets.txt"'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce ikev2pI2 ikev2pI2.pcap ikev2pI2.out '-E "file ikev2pI2-secrets.txt" -v -v -v -v'
+ if ${testdir}/TESTonce ikev2pI2 ${testdir}/ikev2pI2.pcap ${testdir}/ikev2pI2.out '-E "file '${testdir}'/ikev2pI2-secrets.txt" -v -v -v -v'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce isakmp4 isakmp4500.pcap isakmp4.out '-E "file esp-secrets.txt"'
+ if ${testdir}/TESTonce isakmp4 ${testdir}/isakmp4500.pcap ${testdir}/isakmp4.out '-E "file '${testdir}'/esp-secrets.txt"'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
fi
- if ./TESTonce bgp-as-path-oobr-ssl bgp-as-path-oobr.pcap bgp-as-path-oobr-ssl.out '-vvv -e'
+ if ${testdir}/TESTonce bgp-as-path-oobr-ssl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-ssl.out '-vvv -e'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce bgp-aigp-oobr-ssl bgp-aigp-oobr.pcap bgp-aigp-oobr-ssl.out '-vvv -e'
+ if ${testdir}/TESTonce bgp-aigp-oobr-ssl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-ssl.out '-vvv -e'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
FORMAT=' %-35s: TEST SKIPPED (compiled w/OpenSSL)\n'
@@ -124,22 +134,22 @@ else
printf "$FORMAT" isakmp4
printf "$FORMAT" bgp-as-path-oobr-ssl
printf "$FORMAT" bgp-aigp-oobr-ssl
- if ./TESTonce bgp-as-path-oobr-nossl bgp-as-path-oobr.pcap bgp-as-path-oobr-nossl.out '-vvv -e'
+ if ${testdir}/TESTonce bgp-as-path-oobr-nossl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-nossl.out '-vvv -e'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
- if ./TESTonce bgp-aigp-oobr-nossl bgp-aigp-oobr.pcap bgp-aigp-oobr-nossl.out '-vvv -e'
+ if ${testdir}/TESTonce bgp-aigp-oobr-nossl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-nossl.out '-vvv -e'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
fi
diff --git a/tests/cve-2018-10105-segv-sflowprint.out b/tests/cve-2018-10105-segv-sflowprint.out
new file mode 100644
index 0000000..7285f24
--- /dev/null
+++ b/tests/cve-2018-10105-segv-sflowprint.out
@@ -0,0 +1,2 @@
+IP (tos 0x0, ttl 64, id 60790, offset 0, flags [none], proto UDP (17), length 896, bad cksum 72f3 (->72f7)!)
+ 10.0.0.250.3895 > 10.1.2.5.6343: sFlowv5 [length 8 < 28] (invalid)
diff --git a/tests/cve-2018-10105-segv-sflowprint.pcapng b/tests/cve-2018-10105-segv-sflowprint.pcapng
new file mode 100644
index 0000000..60b2869
--- /dev/null
+++ b/tests/cve-2018-10105-segv-sflowprint.pcapng
Binary files differ
diff --git a/tests/cve-2018-10105_smbprint-readofsize1.out b/tests/cve-2018-10105_smbprint-readofsize1.out
new file mode 100644
index 0000000..81729eb
--- /dev/null
+++ b/tests/cve-2018-10105_smbprint-readofsize1.out
@@ -0,0 +1,8 @@
+IP 192.168.56.55.445 > 192.168.56.119.49199: Flags [P.], seq 4267808374:4267808462, ack 628292694, win 63102, length 88 SMB PACKET: SMBtrans2 (REPLY)
+
+IP 192.168.56.119.49199 > 192.168.56.55.445: Flags [P.], seq 1:75, ack 88, win 254, length 74 SMB PACKET: SMBtrans2 (REQUEST)
+
+IP 192.168.56.55.445 > 192.168.56.119.49199: Flags [P.], seq 88:168, ack 75, win 62978, length 80 SMB PACKET: SMBtrans2 (REPLY)
+
+IP 192.168.56.119.49199 > 192.168.56.55.445: Flags [P.], seq 75:151, ack 168, win 253, length 76 SMB PACKET: SMBtrans2 (REQUEST)
+
diff --git a/tests/cve-2018-10105_smbprint-readofsize1.pcap b/tests/cve-2018-10105_smbprint-readofsize1.pcap
new file mode 100644
index 0000000..984bc3a
--- /dev/null
+++ b/tests/cve-2018-10105_smbprint-readofsize1.pcap
Binary files differ
diff --git a/tests/cve-2018-10105_smbutil_withoutasan.out b/tests/cve-2018-10105_smbutil_withoutasan.out
new file mode 100644
index 0000000..3a2ad23
--- /dev/null
+++ b/tests/cve-2018-10105_smbutil_withoutasan.out
@@ -0,0 +1,101 @@
+IP (tos 0x0, ttl 128, id 376, offset 0, flags [DF], proto TCP (6), length 128)
+ 192.168.56.55.445 > 192.168.56.119.49199: Flags [P.], cksum 0x3e2f (incorrect -> 0x3d49), seq 4267808374:4267808462, ack 628292694, win 63102, length 88
+SMB PACKET: SMBtrans2 (REPLY)
+SMB Command = 0x32
+Error class = 0x0
+Error code = 0 (0x0)
+Flags1 = 0xFF
+Flags2 = 0x7
+Tree ID = 2048 (0x800)
+Proc ID = 2848 (0xb20)
+UID = 4098 (0x1002)
+MID = 1616 (0x650)
+Word Count = 10 (0xa)
+TRANSACT2_OPEN param_length=2 data_length=24
+TotParam=2 (0x2)
+TotData=24 (0x18)
+Res1=0x0
+ParamCnt=2 (0x2)
+ParamOff=56 (0x38)
+ParamDisp0 (0x0)
+DataCnt=24 (0x18)
+DataOff=60 (0x3c)
+DataDisp=0 (0x0)
+SetupCnt=0 (0x0)
+smb_bcc=29
+Handle=0 (0x0)
+Attrib=Data=
+Data: (24 bytes)
+[000] 00 00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 \0x00\0x00\0x0b\0x00\0x00\0x00\0x00\0x00 \0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00
+[010] 01 00 00 00 00 00 00 00 \0x01\0x00\0x00\0x00\0x00\0x00\0x00\0x00
+
+IP 192.168.56.119.49199 > 192.168.56.55.445: Flags [P.], seq 1:75, ack 88, win 254, length 74 SMB PACKET: SMBtrans2 (REQUEST)
+
+IP (tos 0x0, ttl 128, id 632, offset 0, flags [DF], proto TCP (6), length 114)
+ 192.168.56.119.49199 > 192.168.56.55.445: Flags [P.], cksum 0x2437 (correct), seq 1:75, ack 88, win 254, length 74
+SMB PACKET: SMBtrans2 (REQUEST)
+SMB Command = 0x32
+Error class = 0x0
+Error code = 0 (0x0)
+Flags1 = 0x18
+Flags2 = 0x7
+Tree ID = 2048 (0x800)
+Proc ID = 2848 (0xb20)
+UID = 4098 (0x1002)
+MID = 1632 (0x660)
+Word Count = 15 (0xf)
+TRANSACT2_QFSINFO param_length=2 data_length=0
+TotParam=2 (0x2)
+TotData=0 (0x0)
+MaxParam=0 (0x0)
+MaxData=560 (0x230)
+MaxSetup=0 (0x0)
+Flags=0x0
+TimeOut=0 (0x0)
+Res1=0x0
+ParamCnt=2 (0x2)
+ParamOff=68 (0x44)
+DataCnt=0 (0x0)
+DataOff=0 (0x0)
+SetupCnt=1 (0x1)
+smb_bcc=5
+InfoLevel=261 (0x105)
+
+
+IP (tos 0x0, ttl 128, id 377, offset 0, flags [DF], proto TCP (6), length 120)
+ 192.168.56.55.445 > 192.168.56.119.49199: Flags [P.], cksum 0xf1fb (incorrect -> 0x1559), seq 88:168, ack 75, win 63028, length 80
+SMB PACKET: SMBtrans2 (REPLY)
+SMB Command = 0x32
+Error class = 0x0
+Error code = 0 (0x0)
+Flags1 = 0x98
+Flags2 = 0x7
+Tree ID = 0 (0x0)
+Proc ID = 0 (0x0)
+UID = 0 (0x0)
+MID = 0 (0x0)
+Word Count = 11 (0xb)
+TRANSACT2_QFSINFO param_length=0 data_length=20
+TotParam=0 (0x0)
+TotData=0 (0x0)
+Res1=0x0
+ParamCnt=0 (0x0)
+ParamOff=56 (0x38)
+ParamDisp0 (0x0)
+DataCnt=20 (0x14)
+DataOff=56 (0x38)
+DataDisp=0 (0x0)
+SetupCnt=0 (0x0)
+smb_bcc=65280
+Capabilities=0x700FF
+MaxFileLen=255 (0xff)
+VolNameLen=4278190088
+Volume=...
+data:
+[000] FF 00 07 00 FF 00 00 00 08 00 00 FF FF FF FF 00 \0xff\0x00\0x07\0x00\0xff\0x00\0x00\0x00 \0x08\0x00\0x00\0xff\0xff\0xff\0xff\0x00
+[010] 46 00 53 00 F\0x00S\0x00
+
+
+IP (tos 0x0, ttl 128, id 633, offset 0, flags [DF], proto TCP (6), length 116)
+ 192.168.56.119.49199 > 192.168.56.55.445: Flags [P.], cksum 0x2253 (incorrect -> 0x229b), seq 75:151, ack 168, win 253, length 76 SMB-over-TCP packet:(raw data or continuation?)
+
diff --git a/tests/cve-2018-10105_smbutil_withoutasan.pcap b/tests/cve-2018-10105_smbutil_withoutasan.pcap
new file mode 100644
index 0000000..3b29577
--- /dev/null
+++ b/tests/cve-2018-10105_smbutil_withoutasan.pcap
Binary files differ
diff --git a/tests/cve2015-0261-ipv6.out b/tests/cve2015-0261-ipv6.out
index 3658c19..3c8da0f 100644
--- a/tests/cve2015-0261-ipv6.out
+++ b/tests/cve2015-0261-ipv6.out
@@ -1,3 +1,4 @@
IP6 truncated-ip6 - 26325 bytes missing!(class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135) payload length: 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:6767:6767:6767:6767:6767:6705: mobility: BU seq#=26471 HL lifetime=105884(type-0x67: len=103)[|MOBILITY]
IP6 truncated-ip6 - 26325 bytes missing!(class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135) payload length: 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:4f67:6767:6767:6767:6767:6767: (header length 8 is too small for type 6)[|MOBILITY]
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/cve2015-0261-ipv6.out.stderr b/tests/cve2015-0261-ipv6.out.stderr
new file mode 100644
index 0000000..7b04def
--- /dev/null
+++ b/tests/cve2015-0261-ipv6.out.stderr
@@ -0,0 +1,2 @@
+reading from file cve2015-0261-ipv6.pcap, link-type SLIP (SLIP)
+tcpdump: pcap_loop: invalid packet capture length 268463617, bigger than snaplen of 65535
diff --git a/tests/dccp_options-oobr.out b/tests/dccp_options-oobr.out
new file mode 100644
index 0000000..8ca46ef
--- /dev/null
+++ b/tests/dccp_options-oobr.out
@@ -0,0 +1,19 @@
+IP (tos 0x0, ttl 64, id 65312, offset 0, flags [DF], proto DCCP (33), length 52)
+ 139.133.209.176.39420 > 139.133.209.65.5001: DCCP (CCVal 0, CsCov 0, cksum 0xaaf3 (incorrect -> 0x8bf3)) DCCP-Request (service=-189888898) seq 8 <nop, nop, nop, nop, change_l ack_ratio 2, change_r ccid 2, change_l ccid 2>
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto DCCP (33), length 68)
+ 139.133.209.65.5001 > 139.133.209.176.39420: DCCP (CCVal 0, CsCov 0, ) DCCP-Response (service=0) (ack=38464816766) seq 1960341146 <nop, nop, change_l ack_ratio 2, [|dccp]>
+IP (tos 0x0, ttl 64, id 65313, offset 0, flags [DF], proto DCCP (33), length 56)
+ 139.133.209.176.39420 > 139.133.209.65.5001: DCCP (CCVal 0, CsCov 0, cksum 0xf53a (incorrect -> 0xf551)) DCCP-Ack (ack=1960341146) seq 38464816767 <nop, confirm_r ack_ratio 2, ack_vector0 0xe9, timestamp_echo [optlen != 6 or 8 or 10]>
+IP (tos 0x0, ttl 64, id 65314, offset 0, flags [DF], proto DCCP (33), length 152)
+ 139.133.209.176.46076 > 139.133.209.65.48009: DCCP (CCVal 0, CsCov 6, ) DCCP-DataAck (ack=1960341146) seq 38464816768 <nop, nop, ack_vector0 0x00, elapsed_time 1249, ndp_count 1>
+IP (tos 0x0, ttl 64, id 3176, offset 0, flags [DF], proto DCCP (33), length 52)
+ 139.133.209.65.5001 > 139.133.209.176.39420: DCCP (CCVal 0, CsCov 0, cksum 0xfc63 (correct)) DCCP-Ack (ack=38464816768) seq 1960341147 <nop, ack_vector0 0x01, elapsed_time 1>
+IP (tos 0x0, ttl 64, id 65315, offset 0, flags [DF], proto DCCP (33), length 148)
+ 139.133.209.176.39420 > 139.133.209.65.5001: DCCP (CCVal 0, CsCov 6, ) DCCP-DataAck (ack=1960341147) seq 38464816769 <nop, ack_vector0 0x00, elapsed_time 84>
+IP (tos 0x0, ttl 64, id 3177, offset 0, flags [DF], proto DCCP (33), length 52)
+ 139.133.209.65.5001 > 139.133.209.176.39420: DCCP (CCVal 0, CsCov 0, cksum 0x0165 (correct)) DCCP-Ack (ack=38464816769) seq 1960341148 <nop, nop, ack_vector0 0x00, ndp_count 1>
+00:07:00:42:00:00 > 00:14:22:59:55:51 Null Information, send seq 0, rcv seq 0, Flags [Command], length 148
+ 0x0000: 0000 0000 1422 5955 5100 07e9 bd5d 1f08 ....."YUQ....]..
+ 0x0010: 0045 0000 34ff 2040 0040 2181 8b8b 85d1 .E..4..@.@!.....
+ 0x0020: b08b 85d1 4199 fc13 8908 00aa f320 0000 ....A...........
+ 0x0030: 08f4 ae86 7e00 0000 ....~...
diff --git a/tests/dccp_options-oobr.pcap b/tests/dccp_options-oobr.pcap
new file mode 100644
index 0000000..65deded
--- /dev/null
+++ b/tests/dccp_options-oobr.pcap
Binary files differ
diff --git a/tests/dns-zlip-1.out b/tests/dns-zlip-1.out
index ce12748..21fc1cc 100644
--- a/tests/dns-zlip-1.out
+++ b/tests/dns-zlip-1.out
@@ -1 +1 @@
-IP 10.0.0.1.1024 > 146.84.28.88.53: 60777 Type49159 (Class 49168)? <BAD PTR>[|domain]
+IP 10.0.0.1.1024 > 146.84.28.88.53: domain [length 0 < 12] (invalid)
diff --git a/tests/dns-zlip-2.out b/tests/dns-zlip-2.out
index dbabefb..21fc1cc 100644
--- a/tests/dns-zlip-2.out
+++ b/tests/dns-zlip-2.out
@@ -1 +1 @@
-IP 10.0.0.1.1024 > 146.84.28.88.53: 18992 Type49164 (Class 49168)? <BAD PTR>[|domain]
+IP 10.0.0.1.1024 > 146.84.28.88.53: domain [length 0 < 12] (invalid)
diff --git a/tests/dns-zlip-3.out b/tests/dns-zlip-3.out
index beb1730..21fc1cc 100644
--- a/tests/dns-zlip-3.out
+++ b/tests/dns-zlip-3.out
@@ -1 +1 @@
-IP 10.0.0.1.1024 > 146.84.28.88.53: 65483 Type49164 (Class 49164)? thisleetostringwillcrashyourlittlenameserverforsurehahahahahah.<BAD PTR>[|domain]
+IP 10.0.0.1.1024 > 146.84.28.88.53: domain [length 0 < 12] (invalid)
diff --git a/tests/eapon2.out b/tests/eapon2.out
new file mode 100644
index 0000000..0b7e8d9
--- /dev/null
+++ b/tests/eapon2.out
@@ -0,0 +1,61 @@
+ARP, Request who-has 192.168.1.1 tell 192.168.1.249, length 28
+ARP, Reply 192.168.1.1 is-at 00:0d:88:4f:25:91, length 46
+IP 192.168.1.249.68 > 192.168.1.1.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAP packet (0) v1, len 5
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
+ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
+ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
+ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
+IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
+IP 169.254.67.194 > 224.0.0.22: igmp v3 report, 1 group record(s)
+IP 169.254.67.194 > 224.0.0.22: igmp v3 report, 1 group record(s)
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
diff --git a/tests/eapon2.pcap b/tests/eapon2.pcap
new file mode 100644
index 0000000..97719f2
--- /dev/null
+++ b/tests/eapon2.pcap
Binary files differ
diff --git a/tests/esp4.out b/tests/esp4.out
new file mode 100644
index 0000000..a829c8e
--- /dev/null
+++ b/tests/esp4.out
@@ -0,0 +1,8 @@
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x1), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x1), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1280, length 64 (ipip-proto-4) (ipip-proto-4)
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x2), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x2), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1536, length 64 (ipip-proto-4) (ipip-proto-4)
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x3), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x3), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1792, length 64 (ipip-proto-4) (ipip-proto-4)
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x4), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x4), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2048, length 64 (ipip-proto-4) (ipip-proto-4)
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x5), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x5), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2304, length 64 (ipip-proto-4) (ipip-proto-4)
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x6), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x6), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2560, length 64 (ipip-proto-4) (ipip-proto-4)
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x7), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x7), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2816, length 64 (ipip-proto-4) (ipip-proto-4)
+IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x8), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x8), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 3072, length 64 (ipip-proto-4) (ipip-proto-4)
diff --git a/tests/frf16_magic_ie-oobr.out b/tests/frf16_magic_ie-oobr.out
new file mode 100644
index 0000000..dc12ee5
--- /dev/null
+++ b/tests/frf16_magic_ie-oobr.out
@@ -0,0 +1,2 @@
+FRF.16 Control, Flags [Begin, End, Control], Unknown Message (0x00), length 3714318497
+ IE Magic Number (3), length 3: (invalid length)[|mfr]
diff --git a/tests/frf16_magic_ie-oobr.pcap b/tests/frf16_magic_ie-oobr.pcap
new file mode 100644
index 0000000..85202fb
--- /dev/null
+++ b/tests/frf16_magic_ie-oobr.pcap
Binary files differ
diff --git a/tests/hncp_prefix-oobr.out b/tests/hncp_prefix-oobr.out
new file mode 100644
index 0000000..1908b89
--- /dev/null
+++ b/tests/hncp_prefix-oobr.out
@@ -0,0 +1,48 @@
+IP6 (class 0xc0, hlim 1, next-header UDP (17) payload length: 436) fe80::b299:28ff:ffc8:d646.6696 > ff02::59:0:0:1:6.6696: [bad udp cksum 0x2997 -> 0xbbd2!] babel 2 (424)
+ Hello seqno 58134 interval 4.00s sub-unknown-0x08 sub-pad1 sub-pad1 sub-unknown-0x04 sub-unknown-0x30 sub-diversity 2-2 (bogus) sub-diversity 2-2 (bogus) sub-diversity 2-48 (bogus) (invalid)
+ Unknown message type 48
+ Unknown message type 223
+ Pad 1
+ Unknown message type 51
+ Pad 1
+ Pad 1
+ Pad 1
+ HMAC (invalid)
+IP6 (hlim 57, next-header UDP (17) payload length: 332) fe80::218:f3ff:ffa9:914e.8231 > fe80::21e:64ff:fe23:4d34.8231: [bad udp cksum 0xbd4b -> 0x0e98!] hncp (324)
+ Node endpoint (12) NID: 31:da:78:d2 EPID: 03000000
+ Node state (312) NID: 31:da:78:d2 seqno: 19 160.105s hash: 800088c8e0714638
+ Peer (16) Peer-NID: 61:69:ed:63 Peer-EPID: 01000000 Local-EPID: 01000000
+ HNCP-Version (22) M: 0 P: 4 H: 4 L: 4 User-agent: hnetd/cac971d
+ External-Connection (52)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ Unassigned: type=510 (4)
+ Assigned-Prefix (18) EPID: 03000000 Prty: 2 Prefix: fd1f:f88c:e200::/44
+ (invalid)
+ Assigned-Prefix (25) EPID: 01000001 Prty: 0 Prefix: ::/0
+ Reserved: type=0 (4)
+ Reserved: type=0 (4)
+ [|hncp]
+ Assigned-Prefix (25) EPID: 03000000 Prty: 2 Prefix: 10.0.101.0/24
+ Node-Address (24) EPID: 01000000 IP Address: ::2100:0:ffff:a00:6302
+ Node-Address (24) EPID: 01000000 IP Address: fd1f:f88c:e207::f3ff
+ [|hncp]
+IP6 (hlim 64, next-header UDP (17) payload length: 564) fe80::218:f3ff:fea9:914e.8231 > fe80::21e:64ff:fe23:4d34.8231: [bad udp cksum 0xe65a -> 0x7725!] hncp (556)
+ Node endpoint (12) NID: 31:10:00:00 EPID: 00000000
+ Node state (544) NID: 61:69:ed:63 seqno: 12 969.699s hash: 011fffa1da966148
+ Peer (16) Peer-NID: 31:da:78:d2 Peer-EPID: 01000000 Local-EPID: 01000000
+ Future use: type=64031 (22)
+ External-Connection (23)
+ Delegated-Prefix (19) VLSO: 0.599s PLSO: 0.299s Prefix: fd1f:f88c:e207::/48
+ Assigned-Prefix (143) EPID: 8b8b8b8b Prty: 11 Prefix: (invalid)
+ Private use: type=768 (4)
+ [|hncp]
diff --git a/tests/hncp_prefix-oobr.pcapng b/tests/hncp_prefix-oobr.pcapng
new file mode 100644
index 0000000..9c4c016
--- /dev/null
+++ b/tests/hncp_prefix-oobr.pcapng
Binary files differ
diff --git a/tests/icmp-icmp_print-oobr-1.out b/tests/icmp-icmp_print-oobr-1.out
new file mode 100644
index 0000000..20874b3
--- /dev/null
+++ b/tests/icmp-icmp_print-oobr-1.out
@@ -0,0 +1,7 @@
+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]
+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: vrrp 22.3.211.0 > 54.209.0.0: VRRPv3, Advertisement, (ttl 64), vrid 128, prio 69[|vrrp]
+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 0000000..86827df
--- /dev/null
+++ b/tests/icmp-icmp_print-oobr-1.pcap
Binary files differ
diff --git a/tests/icmp-icmp_print-oobr-2.out b/tests/icmp-icmp_print-oobr-2.out
new file mode 100644
index 0000000..70250da
--- /dev/null
+++ b/tests/icmp-icmp_print-oobr-2.out
@@ -0,0 +1,5 @@
+IP truncated-ip - 39 bytes missing! (tos 0x7f,CE, ttl 254, id 40208, offset 0, flags [none], proto VRRP (112), length 68, options (unknown 69 [bad length 83]), bad cksum 9b15 (->b774)!)
+ 250.219.91.20 > 209.150.251.64: vrrp 250.219.91.20 > 209.150.251.64: VRRPv2, Advertisement, (ttl 254)[|vrrp]
+[|fr]
+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 0000000..515ac92
--- /dev/null
+++ b/tests/icmp-icmp_print-oobr-2.pcap
Binary files differ
diff --git a/tests/icmp6_mobileprefix_asan.out b/tests/icmp6_mobileprefix_asan.out
index 0e0d97c..889b1c8 100644
--- a/tests/icmp6_mobileprefix_asan.out
+++ b/tests/icmp6_mobileprefix_asan.out
@@ -1,2 +1,2 @@
-IP6 (class 0x50, flowlabel 0x0002c, hlim 0, next-header ICMPv6 (58) payload length: 7168) 4f:f829:c:1a1a:1a1a:1a1a:1a37:0 > 16:0:400:0:64fb:9303:f293:8200: ICMP6, mobile router advertisement, length 7168, id 0x9393[|icmp6]
+IP6 (class 0x50, flowlabel 0x0002c, hlim 0, next-header ICMPv6 (58) payload length: 7168) 4f:f829:c:1a1a:1a1a:1a1a:1a37:0 > 16:0:400:0:64fb:9303:f293:8200: ICMP6, mobile router advertisement, length 7168, id 0x9393 [|icmp6]
[|ether]
diff --git a/tests/icmp6_nodeinfo_oobr.out b/tests/icmp6_nodeinfo_oobr.out
index 0856ea2..19db749 100644
--- a/tests/icmp6_nodeinfo_oobr.out
+++ b/tests/icmp6_nodeinfo_oobr.out
@@ -1 +1 @@
-IP6 a072:7f00:1:7f00:1:e01a:17:6785 > c903::a002:8018:fe30:0:204: ICMP6, who-are-you reply[|icmp6], length 4
+IP6 a072:7f00:1:7f00:1:e01a:17:6785 > c903::a002:8018:fe30:0:204: ICMP6, who-are-you reply [|icmp6], length 4
diff --git a/tests/icmpv6.out b/tests/icmpv6.out
index bb7775e..66bdcc1 100644
--- a/tests/icmpv6.out
+++ b/tests/icmpv6.out
@@ -1,5 +1,5 @@
IP6 (hlim 255, next-header ICMPv6 (58) payload length: 176) fe80::b299:28ff:fec8:d66c > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 176
- hop limit 64, Flags [home agent], pref medium, router lifetime 15s, reachable time 0s, retrans time 0s
+ hop limit 64, Flags [home agent], pref medium, router lifetime 15s, reachable time 0ms, retrans timer 0ms
prefix info option (3), length 32 (4): 2222:3333:4444:5555:6600::/72, Flags [onlink, auto], valid time 2592000s, pref. time 604800s
0x0000: 48c0 0027 8d00 0009 3a80 0000 0000 2222
0x0010: 3333 4444 5555 6600 0000 0000 0000
diff --git a/tests/icmpv6_opt24-v.out b/tests/icmpv6_opt24-v.out
index 2b7cf09..edcffb1 100644
--- a/tests/icmpv6_opt24-v.out
+++ b/tests/icmpv6_opt24-v.out
@@ -1,5 +1,5 @@
IP6 (hlim 255, next-header ICMPv6 (58) payload length: 120) fe80::16cf:92ff:fe87:23d6 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 120
- hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 0s, reachable time 0s, retrans time 0s
+ hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 0s, reachable time 0ms, retrans timer 0ms
source link-address option (1), length 8 (1): 14:cf:92:87:23:d6
mtu option (5), length 8 (1): 1500
prefix info option (3), length 32 (4): fd8d:4fb3:5b2e::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s
@@ -7,7 +7,7 @@ IP6 (hlim 255, next-header ICMPv6 (58) payload length: 120) fe80::16cf:92ff:fe87
rdnss option (25), length 24 (3): lifetime 1800s, addr: fd8d:4fb3:5b2e::1
dnssl option (31), length 16 (2): lifetime 1800s, domain(s): lan.
IP6 (hlim 255, next-header ICMPv6 (58) payload length: 120) fe80::16cf:92ff:fe87:23d6 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 120
- hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 0s, reachable time 0s, retrans time 0s
+ hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 0s, reachable time 0ms, retrans timer 0ms
source link-address option (1), length 8 (1): 14:cf:92:87:23:d6
mtu option (5), length 8 (1): 1500
prefix info option (3), length 32 (4): fd8d:4fb3:5b2e::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s
diff --git a/tests/ieee802.11_meshhdr-oobr.out b/tests/ieee802.11_meshhdr-oobr.out
new file mode 100644
index 0000000..6b3ab3f
--- /dev/null
+++ b/tests/ieee802.11_meshhdr-oobr.out
@@ -0,0 +1 @@
+3472328296059908144us tsft 24.0 Mb/s 12334 MHz Turbo 48dBm noise [|802.11][|802.11]
diff --git a/tests/ieee802.11_meshhdr-oobr.pcap b/tests/ieee802.11_meshhdr-oobr.pcap
new file mode 100644
index 0000000..48445d7
--- /dev/null
+++ b/tests/ieee802.11_meshhdr-oobr.pcap
Binary files differ
diff --git a/tests/isakmp-ikev1_n_print-oobr.out b/tests/isakmp-ikev1_n_print-oobr.out
new file mode 100644
index 0000000..edbd190
--- /dev/null
+++ b/tests/isakmp-ikev1_n_print-oobr.out
@@ -0,0 +1,8 @@
+IP (tos 0x12,ECT(0), ttl 17, id 47119, offset 0, flags [+, DF, rsvd], proto UDP (17), length 296, bad cksum 1ff (->327b)!)
+ 80.236.128.20.500 > 12.251.0.45.49152: isakmp 2.12 msgid 10101010: child_sa ikev2_auth[V]:
+ (n: doi=0 proto=128 type=#24577) [|#126] (len mismatch: isakmp 4278190080/ip 268)
+IP (tos 0x12,ECT(0), ttl 17, id 21263, offset 72, flags [+, DF, rsvd], proto unknown (40), length 296, bad cksum fbff (->9847)!)
+ 80.0.128.20 > 12.251.0.45: ip-proto-40
+IP (tos 0x15,ECT(1), ttl 17, id 21263, offset 0, flags [+, DF, rsvd], proto UDP (17), length 296, bad cksum 1ff (->9864)!)
+ 80.0.128.20.500 > 12.251.0.45.49152: isakmp 2.12 msgid 1010100b: child_sa ikev2_auth[V]:
+ (n: doi=ipsec proto=#16 type=REPLAY-STATUS spi=04 status=( [|n]) (len mismatch: isakmp 620756992/ip 268)
diff --git a/tests/isakmp-ikev1_n_print-oobr.pcap b/tests/isakmp-ikev1_n_print-oobr.pcap
new file mode 100644
index 0000000..026724b
--- /dev/null
+++ b/tests/isakmp-ikev1_n_print-oobr.pcap
Binary files differ
diff --git a/tests/isis-seg-fault-1-v.sh b/tests/isis-seg-fault-1-v.sh
index d19b4a8..44b4894 100755
--- a/tests/isis-seg-fault-1-v.sh
+++ b/tests/isis-seg-fault-1-v.sh
@@ -7,20 +7,27 @@
exitcode=0
test_name=isis-seg-fault-1-v
-if [ ! -f ../Makefile ]
+srcdir=${1-..}
+: echo $0 using ${srcdir}
+
+testdir=${srcdir}/tests
+passedfile=tests/.passed
+failedfile=tests/.failed
+passed=`cat ${passedfile}`
+failed=`cat ${failedfile}`
+
+if [ ! -f Makefile ]
then
printf ' %-35s: TEST SKIPPED (no Makefile)\n' $test_name
-elif grep '^CC = .*gcc' ../Makefile >/dev/null
+elif grep '^CC = .*gcc' Makefile >/dev/null
then
- passed=`cat .passed`
- failed=`cat .failed`
- if ./TESTonce $test_name isis-seg-fault-1.pcap isis-seg-fault-1-v.out '-v'
+ if ${testdir}/TESTonce $test_name ${testdir}/isis-seg-fault-1.pcap ${testdir}/isis-seg-fault-1-v.out '-v'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
else
diff --git a/tests/juniper_header-heapoverflow.pcap b/tests/juniper_header-heapoverflow.pcap
index ea88636..2b96647 100644
--- a/tests/juniper_header-heapoverflow.pcap
+++ b/tests/juniper_header-heapoverflow.pcap
Binary files differ
diff --git a/tests/kday1.out b/tests/kday1.out
index 9cb884d..a1a28fc 100644
--- a/tests/kday1.out
+++ b/tests/kday1.out
@@ -1,2 +1,3 @@
IP6, wrong link-layer encapsulation
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday1.out.stderr b/tests/kday1.out.stderr
new file mode 100644
index 0000000..ab22332
--- /dev/null
+++ b/tests/kday1.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday1.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: invalid packet capture length 138952731, bigger than snaplen of 65535
diff --git a/tests/kday2.out b/tests/kday2.out
index ccbaae9..df791fe 100644
--- a/tests/kday2.out
+++ b/tests/kday2.out
@@ -19,4 +19,5 @@ IP (tos 0x0, ttl 64, id 63178, offset 0, flags [DF], proto TCP (6), length 52, b
IP (tos 0x0, ttl 64, id 36752, offset 0, flags [DF], proto TCP (6), length 399, bad cksum a46b (->a474)!)
204.0.55.10.323 > 204.9.54.80.55936: Flags [P.], cksum 0xc9b6 (incorrect -> 0x8900), seq 3589495407:3589495754, ack 370428050, win 1040, options [nop,nop,TS val 2364757411 ecr 3084508609], length 347
RPKI-RTRv177 (unknown)
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday2.out.stderr b/tests/kday2.out.stderr
new file mode 100644
index 0000000..b4402a9
--- /dev/null
+++ b/tests/kday2.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday2.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: truncated dump file; tried to read 16 header bytes, only got 3
diff --git a/tests/kday3.out b/tests/kday3.out
index 4ae7a5c..386315d 100644
--- a/tests/kday3.out
+++ b/tests/kday3.out
@@ -17,4 +17,5 @@ IP (tos 0x0, ttl 64, id 63178, offset 0, flags [DF], proto TCP (6), length 52, b
IP (tos 0x0, ttl 64, id 36752, offset 0, flags [DF], proto TCP (6), length 399, bad cksum a46b (->a474)!)
204.0.55.10.323 > 204.9.54.80.55936: Flags [P.], cksum 0xc9b6 (incorrect -> 0xa6b3), seq 0:347, ack 1, win 1040, options [nop,nop,TS val 2364757411 ecr 3084508609], length 347
RPKI-RTRv177 (unknown)
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday3.out.stderr b/tests/kday3.out.stderr
new file mode 100644
index 0000000..05115b0
--- /dev/null
+++ b/tests/kday3.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday3.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: invalid packet capture length 1817495761, bigger than snaplen of 65535
diff --git a/tests/kday4.out b/tests/kday4.out
index 5e2ab47..92146ff 100644
--- a/tests/kday4.out
+++ b/tests/kday4.out
@@ -30,4 +30,5 @@ IP (tos 0x0, ttl 64, id 63178, offset 0, flags [DF], proto TCP (6), length 52, b
IP (tos 0x0, ttl 64, id 36752, offset 0, flags [DF], proto TCP (6), length 399, bad cksum a46b (->a474)!)
204.0.55.10.323 > 204.9.54.80.55936: Flags [P.], cksum 0xc9b6 (incorrect -> 0x3f28), seq 0:347, ack 4294959105, win 1040, options [nop,nop,TS val 2364757411 ecr 3084508609], length 347
RPKI-RTRv177 (unknown)
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday4.out.stderr b/tests/kday4.out.stderr
new file mode 100644
index 0000000..c470f9c
--- /dev/null
+++ b/tests/kday4.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday4.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: truncated dump file; tried to read 16 header bytes, only got 1
diff --git a/tests/kday5.out b/tests/kday5.out
index a529dd2..4caaca0 100644
--- a/tests/kday5.out
+++ b/tests/kday5.out
@@ -19,4 +19,5 @@ IP (tos 0x0, ttl 64, id 63178, offset 0, flags [DF], proto TCP (6), length 52, b
IP (tos 0x0, ttl 64, id 36752, offset 0, flags [DF], proto TCP (6), length 399, bad cksum a46b (->a474)!)
204.0.55.10.323 > 204.9.54.80.55936: Flags [P.], cksum 0xc9b6 (incorrect -> 0x183a), seq 3589495407:3589495754, ack 370428050, win 1040, options [nop,nop,TS val 2351322531 ecr 3084508609], length 347
RPKI-RTRv177 (unknown)
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday5.out.stderr b/tests/kday5.out.stderr
new file mode 100644
index 0000000..72c4c15
--- /dev/null
+++ b/tests/kday5.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday5.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: invalid packet capture length 168430090, bigger than snaplen of 65535
diff --git a/tests/kday6.out b/tests/kday6.out
index 0c11b5d..25210db 100644
--- a/tests/kday6.out
+++ b/tests/kday6.out
@@ -347,4 +347,5 @@ FRF.16 Frag, seq 693, Flags [Begin], UI e8! IS-IS, length 301989913
unknown TLV #58, length: 58
0x0000: 3a3a 3a3a 3a3a 3a3a 3a3a 3a3a 3a3a 3a3a
0x0010: 3a3a 3a [|isis]
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday6.out.stderr b/tests/kday6.out.stderr
new file mode 100644
index 0000000..be6a293
--- /dev/null
+++ b/tests/kday6.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday6.pcap, link-type MFR (FRF.16 Frame Relay)
+tcpdump: pcap_loop: invalid packet capture length 976894522, bigger than snaplen of 65535
diff --git a/tests/kday7.out b/tests/kday7.out
index 569cde6..c7701b9 100644
--- a/tests/kday7.out
+++ b/tests/kday7.out
@@ -30,4 +30,5 @@ IP (tos 0x0, ttl 64, id 63178, offset 0, flags [DF], proto TCP (6), length 52, b
IP (tos 0x0, ttl 64, id 36752, offset 0, flags [DF], proto TCP (6), length 399, bad cksum a46b (->a474)!)
204.0.55.10.323 > 204.9.54.80.55936: Flags [P.], cksum 0xc9b6 (incorrect -> 0x4ba9), seq 0:347, ack 4294959105, win 1040, options [nop,nop,TS val 2364757411 ecr 3084508609], length 347
RPKI-RTRv177 (unknown)
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday7.out.stderr b/tests/kday7.out.stderr
new file mode 100644
index 0000000..8ca6a7a
--- /dev/null
+++ b/tests/kday7.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday7.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: invalid packet capture length 138948798, bigger than snaplen of 511
diff --git a/tests/kday8.out b/tests/kday8.out
index 2e4060b..8ae0fd2 100644
--- a/tests/kday8.out
+++ b/tests/kday8.out
@@ -19,4 +19,5 @@ IP (tos 0x0, ttl 64, id 63178, offset 0, flags [DF], proto TCP (6), length 52, b
IP (tos 0x0, ttl 64, id 36752, offset 0, flags [DF], proto TCP (6), length 399, bad cksum a46b (->a474)!)
204.0.55.10.323 > 204.9.54.80.55936: Flags [P.], cksum 0xc9b6 (incorrect -> 0xed9b), seq 3589495407:3589495754, ack 370428050, win 1040, options [nop,nop,TS val 2364757411 ecr 3084508609], length 347
RPKI-RTRv177 (unknown)
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kday8.out.stderr b/tests/kday8.out.stderr
new file mode 100644
index 0000000..437e840
--- /dev/null
+++ b/tests/kday8.out.stderr
@@ -0,0 +1,2 @@
+reading from file kday8.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: truncated dump file; tried to read 16 header bytes, only got 3
diff --git a/tests/kh-addrfail-001.out b/tests/kh-addrfail-001.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-001.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-001.out.stderr b/tests/kh-addrfail-001.out.stderr
new file mode 100644
index 0000000..f179cba
--- /dev/null
+++ b/tests/kh-addrfail-001.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _3929026608_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-001.pcap b/tests/kh-addrfail-001.pcap
new file mode 100644
index 0000000..16374f0
--- /dev/null
+++ b/tests/kh-addrfail-001.pcap
@@ -0,0 +1,3 @@
+
+
+000êM<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-002.out b/tests/kh-addrfail-002.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-002.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-002.out.stderr b/tests/kh-addrfail-002.out.stderr
new file mode 100644
index 0000000..7930c58
--- /dev/null
+++ b/tests/kh-addrfail-002.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _4281348144_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-002.pcap b/tests/kh-addrfail-002.pcap
new file mode 100644
index 0000000..e7833c8
--- /dev/null
+++ b/tests/kh-addrfail-002.pcap
@@ -0,0 +1,3 @@
+
+
+000ÿM<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-003.out b/tests/kh-addrfail-003.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-003.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-003.out.stderr b/tests/kh-addrfail-003.out.stderr
new file mode 100644
index 0000000..111a886
--- /dev/null
+++ b/tests/kh-addrfail-003.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _3794808880_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-003.pcap b/tests/kh-addrfail-003.pcap
new file mode 100644
index 0000000..caed214
--- /dev/null
+++ b/tests/kh-addrfail-003.pcap
@@ -0,0 +1,3 @@
+
+
+000âM<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-004.out b/tests/kh-addrfail-004.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-004.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-004.out.stderr b/tests/kh-addrfail-004.out.stderr
new file mode 100644
index 0000000..dd39511
--- /dev/null
+++ b/tests/kh-addrfail-004.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _2150641712_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-004.pcap b/tests/kh-addrfail-004.pcap
new file mode 100644
index 0000000..83bf4a4
--- /dev/null
+++ b/tests/kh-addrfail-004.pcap
@@ -0,0 +1,3 @@
+
+
+000€M<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-005.out b/tests/kh-addrfail-005.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-005.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-005.out.stderr b/tests/kh-addrfail-005.out.stderr
new file mode 100644
index 0000000..b6ef8d5
--- /dev/null
+++ b/tests/kh-addrfail-005.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _1680879664_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-005.pcap b/tests/kh-addrfail-005.pcap
new file mode 100644
index 0000000..4e74f42
--- /dev/null
+++ b/tests/kh-addrfail-005.pcap
@@ -0,0 +1,3 @@
+
+
+000dM<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-006.out b/tests/kh-addrfail-006.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-006.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-006.out.stderr b/tests/kh-addrfail-006.out.stderr
new file mode 100644
index 0000000..0428558
--- /dev/null
+++ b/tests/kh-addrfail-006.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _2905616432_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-006.pcap b/tests/kh-addrfail-006.pcap
new file mode 100644
index 0000000..f50fc44
--- /dev/null
+++ b/tests/kh-addrfail-006.pcap
@@ -0,0 +1,3 @@
+
+
+000­M<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-007.out b/tests/kh-addrfail-007.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-007.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-007.out.stderr b/tests/kh-addrfail-007.out.stderr
new file mode 100644
index 0000000..f37515c
--- /dev/null
+++ b/tests/kh-addrfail-007.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _3710922800_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-007.pcap b/tests/kh-addrfail-007.pcap
new file mode 100644
index 0000000..59a0eb0
--- /dev/null
+++ b/tests/kh-addrfail-007.pcap
@@ -0,0 +1,3 @@
+
+
+000ÝM<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-008.out b/tests/kh-addrfail-008.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-008.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-008.out.stderr b/tests/kh-addrfail-008.out.stderr
new file mode 100644
index 0000000..6ac5142
--- /dev/null
+++ b/tests/kh-addrfail-008.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _808464432_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-008.pcap b/tests/kh-addrfail-008.pcap
new file mode 100644
index 0000000..a90f581
--- /dev/null
+++ b/tests/kh-addrfail-008.pcap
@@ -0,0 +1,3 @@
+
+
+0000M<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-009.out b/tests/kh-addrfail-009.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-009.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-009.out.stderr b/tests/kh-addrfail-009.out.stderr
new file mode 100644
index 0000000..3582875
--- /dev/null
+++ b/tests/kh-addrfail-009.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _1932537904_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-009.pcap b/tests/kh-addrfail-009.pcap
new file mode 100644
index 0000000..a6e68ea
--- /dev/null
+++ b/tests/kh-addrfail-009.pcap
@@ -0,0 +1,3 @@
+
+
+000sM<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-010.out b/tests/kh-addrfail-010.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-010.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-010.out.stderr b/tests/kh-addrfail-010.out.stderr
new file mode 100644
index 0000000..a5099b0
--- /dev/null
+++ b/tests/kh-addrfail-010.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _1915760688_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-010.pcap b/tests/kh-addrfail-010.pcap
new file mode 100644
index 0000000..0973d7a
--- /dev/null
+++ b/tests/kh-addrfail-010.pcap
@@ -0,0 +1,3 @@
+
+
+000rM<+ \ No newline at end of file
diff --git a/tests/kh-addrfail-011.out b/tests/kh-addrfail-011.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/kh-addrfail-011.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/kh-addrfail-011.out.stderr b/tests/kh-addrfail-011.out.stderr
new file mode 100644
index 0000000..f292c90
--- /dev/null
+++ b/tests/kh-addrfail-011.out.stderr
@@ -0,0 +1 @@
+tcpdump: Section Header Block in pcapng dump file has invalid length 28 < _4046467120_ < 1048576 (BT_SHB_INSANE_MAX)
diff --git a/tests/kh-addrfail-011.pcap b/tests/kh-addrfail-011.pcap
new file mode 100644
index 0000000..1a421fb
--- /dev/null
+++ b/tests/kh-addrfail-011.pcap
@@ -0,0 +1,3 @@
+
+
+000ñM<+ \ No newline at end of file
diff --git a/tests/kh-tcpdump-001.out b/tests/kh-tcpdump-001.out
new file mode 100644
index 0000000..e68f867
--- /dev/null
+++ b/tests/kh-tcpdump-001.out
@@ -0,0 +1,17 @@
+30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
+ 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0010: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0020: 3030 00
+30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
+ 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0010: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0020: 3030 00
+30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
+ 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0010: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0020: 3030 00
+30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
+ 0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0010: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
+ 0x0020: 3030 00
+IP truncated-ip - 14 bytes missing! 48.48.48.48.525 > 48.48.48.48.12336: (tsp_type 0x30) vers 48 seq 12336 [|timed]
diff --git a/tests/kh-tcpdump-001.pcap b/tests/kh-tcpdump-001.pcap
new file mode 100644
index 0000000..118c7eb
--- /dev/null
+++ b/tests/kh-tcpdump-001.pcap
Binary files differ
diff --git a/tests/kh-tcpdump-002.out b/tests/kh-tcpdump-002.out
new file mode 100644
index 0000000..d4d7d51
--- /dev/null
+++ b/tests/kh-tcpdump-002.out
@@ -0,0 +1 @@
+IP 48.48.48.48.525 > 48.48.48.48.12336: (tsp_type 0x30) vers 48 seq 12336 [|timed]
diff --git a/tests/kh-tcpdump-002.pcap b/tests/kh-tcpdump-002.pcap
new file mode 100644
index 0000000..f38f0ec
--- /dev/null
+++ b/tests/kh-tcpdump-002.pcap
Binary files differ
diff --git a/tests/kh-tcpdump-004.pcap b/tests/kh-tcpdump-004.pcap
new file mode 100644
index 0000000..d5f5aa3
--- /dev/null
+++ b/tests/kh-tcpdump-004.pcap
Binary files differ
diff --git a/tests/l2tp-avp-overflow.out b/tests/l2tp-avp-overflow.out
index a3b1db2..5b80d98 100644
--- a/tests/l2tp-avp-overflow.out
+++ b/tests/l2tp-avp-overflow.out
@@ -36,4 +36,5 @@ IP (tos 0x30, ttl 48, id 12331, offset 0, flags [none], proto UDP (17), length 8
127.0.0.229.12416 > 127.236.0.1.1701: l2tp:[TL](560/2056) VENDOR0001:ATTR0023(0530) |...
IP (tos 0x30, ttl 48, id 12336, offset 0, flags [none], proto UDP (17), length 12336, bad cksum 1f51 (->2a8b)!)
127.0.0.229.12416 > 127.236.0.1.1701: l2tp:[TL](560/2056) VENDOR0080:ATTR06a5(19e8) |...
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/l2tp-avp-overflow.out.stderr b/tests/l2tp-avp-overflow.out.stderr
new file mode 100644
index 0000000..4c7db91
--- /dev/null
+++ b/tests/l2tp-avp-overflow.out.stderr
@@ -0,0 +1,2 @@
+reading from file l2tp-avp-overflow.pcap, link-type EN10MB (Ethernet)
+tcpdump: pcap_loop: invalid packet capture length 2147430448, bigger than snaplen of 58
diff --git a/tests/ldp-ldp_tlv_print-oobr.out b/tests/ldp-ldp_tlv_print-oobr.out
new file mode 100644
index 0000000..e5f6117
--- /dev/null
+++ b/tests/ldp-ldp_tlv_print-oobr.out
@@ -0,0 +1,6 @@
+IP (tos 0x0, id 4608, offset 0, flags [+, DF, rsvd], proto UDP (17), length 25600, options (EOL), bad cksum 8e (->4023)!)
+ 24.250.219.0.4098 > 0.0.0.0.646:
+ LDP, Label-Space-ID: 0.0.127.255:796, pdu-length: 514
+ Address Withdraw Message (0x0301), length: 22, Message ID: 0x00001600, Flags: [ignore if unknown]
+ Unknown TLV (0x0404), length: 0, Flags: [ignore and don't forward if unknown]
+ Fault-Tolerant Session Parameters TLV (0x0503), length: 8, Flags: [ignore and don't forward if unknown] [|LDP] [|LDP]
diff --git a/tests/ldp-ldp_tlv_print-oobr.pcap b/tests/ldp-ldp_tlv_print-oobr.pcap
new file mode 100644
index 0000000..29fb84a
--- /dev/null
+++ b/tests/ldp-ldp_tlv_print-oobr.pcap
Binary files differ
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 0000000..b655b07
--- /dev/null
+++ b/tests/lmp-lmp_print_data_link_subobjs-oobr.out
@@ -0,0 +1,20 @@
+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]
+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 0000000..d1a6ad9
--- /dev/null
+++ b/tests/lmp-lmp_print_data_link_subobjs-oobr.pcap
Binary files differ
diff --git a/tests/lmp-v.sh b/tests/lmp-v.sh
index a8c6740..e5a49a2 100755
--- a/tests/lmp-v.sh
+++ b/tests/lmp-v.sh
@@ -7,23 +7,31 @@
# the architecture.
exitcode=0
+srcdir=${1-..}
+: echo $0 using ${srcdir}
+
+testdir=${srcdir}/tests
+passedfile=tests/.passed
+failedfile=tests/.failed
+passed=`cat ${passedfile}`
+failed=`cat ${failedfile}`
# A Windows build may have no file named Makefile and also a version of grep
# that won't return an error when the file does not exist. Work around.
-if [ ! -f ../Makefile ]
+if [ ! -f Makefile ]
then
printf ' %-35s: TEST SKIPPED (no Makefile)\n' 'lmp-v'
-elif grep '^CC = .*gcc' ../Makefile >/dev/null
+elif grep '^CC = .*gcc' Makefile >/dev/null
then
- passed=`cat .passed`
- failed=`cat .failed`
- if ./TESTonce lmp-v lmp.pcap lmp-v.out '-T lmp -v'
+ passed=`cat ${passedfile}`
+ failed=`cat ${failedfile}`
+ if ${testdir}/TESTonce lmp-v ${testdir}/lmp.pcap ${testdir}/lmp-v.out '-T lmp -v'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
else
diff --git a/tests/lmpv1_busyloop.out b/tests/lmpv1_busyloop.out
index b85b0e8..f6b88ed 100644
--- a/tests/lmpv1_busyloop.out
+++ b/tests/lmpv1_busyloop.out
@@ -38,5 +38,4 @@
0x01d0: 0200 0200 0002 0002 0000 0200 0200 0002
0x01e0: 0002 0000 0200 0200 0002 0002 0000 0200
0x01f0: 0200 0002 0002 0000 0200 0200 0002 0002
- Unknown Object (0), Class-Type: Unknown (0) Flags: [non-negotiable], length: 512
- packet exceeded snapshot
+ Unknown Object (0), Class-Type: Unknown (0) Flags: [non-negotiable], length: 512 [|LMP]
diff --git a/tests/nflog-e.sh b/tests/nflog-e.sh
index 5b5b66c..89dcc40 100755
--- a/tests/nflog-e.sh
+++ b/tests/nflog-e.sh
@@ -1,20 +1,26 @@
#!/bin/sh
exitcode=0
+srcdir=${1-..}
+: echo $0 using ${srcdir}
+
+testdir=${srcdir}/tests
+passedfile=tests/.passed
+failedfile=tests/.failed
+passed=`cat ${passedfile}`
+failed=`cat ${failedfile}`
# NFLOG support depends on both DLT_NFLOG and working <pcap/nflog.h>
-if grep '^#define HAVE_PCAP_NFLOG_H 1$' ../config.h >/dev/null
+if grep '^#define HAVE_PCAP_NFLOG_H 1$' config.h >/dev/null
then
- passed=`cat .passed`
- failed=`cat .failed`
- if ./TESTonce nflog-e nflog.pcap nflog-e.out '-e'
+ if ${testdir}/TESTonce nflog-e ${testdir}/nflog.pcap ${testdir}/nflog-e.out '-e'
then
passed=`expr $passed + 1`
- echo $passed >.passed
+ echo $passed >${passedfile}
else
failed=`expr $failed + 1`
- echo $failed >.failed
+ echo $failed >${failedfile}
exitcode=1
fi
else
diff --git a/tests/of10_7050sx_bsn-oobr.out b/tests/of10_7050sx_bsn-oobr.out
new file mode 100644
index 0000000..f39e275
--- /dev/null
+++ b/tests/of10_7050sx_bsn-oobr.out
@@ -0,0 +1,16 @@
+IP (tos 0x0, ttl 64, id 60713, offset 0, flags [DF], proto TCP (6), length 562)
+ 109.74.202.168.6653 > 88.150.169.52.4756: Flags [P.], seq 3422281781:3422282291, ack 774258090, win 252, options [nop,nop,TS val 590230876 ecr 50526785], length 510: OpenFlow
+ version 1.0, type VENDOR, length 24, xid 0x0000001a, vendor 0x005c16c7 (Big Switch Networks)
+ subtype SET_IP_MASK, index 1, mask 255.0.14.0
+ version 1.0, type VENDOR, length 24, xid 0x0000001b, vendor 0x005c16c7 (Big Switch Networks)
+ subtype SET_IP_MASK, index 2, mask 255.0.28.0
+ version 1.0, type VENDOR, length 24, xid 0x0000001c, vendor 0x005c16c7 (Big Switch Networks)
+ subtype SET_IP_MASK, index 3, mask 255.0.56.0
+ version 1.0, type VENDOR, length 24, xid 0x0000001d, vendor 0x005c16c7 (Big Switch Networks)
+ subtype SET_IP_MASK, index 4, mask 255.0.112.0
+ version 1.0, type VENDOR, length 24, xid 0x0000001e, vendor 0x005c16c7 (Big Switch Networks)
+ subtype SET_IP_MASK, index 5, mask 255.0.224.0
+ version 1.0, type VENDOR, length 24, xid 0x0000001f, vendor 0x005c16c7 (Big Switch Networks)
+ subtype GET_IP_MASK_REQUEST, index 3
+ version 1.0, type VENDOR, length 30, xid 0x00000020, vendor 0x005c16c7 (Big Switch Networks)
+ subtype SHELL_COMMAND, service 0, data 'show cloc' [|openflow]
diff --git a/tests/of10_7050sx_bsn-oobr.pcap b/tests/of10_7050sx_bsn-oobr.pcap
new file mode 100644
index 0000000..a564248
--- /dev/null
+++ b/tests/of10_7050sx_bsn-oobr.pcap
Binary files differ
diff --git a/tests/ospf6_print_lshdr-oobr.out b/tests/ospf6_print_lshdr-oobr.out
new file mode 100644
index 0000000..71adf6b
--- /dev/null
+++ b/tests/ospf6_print_lshdr-oobr.out
@@ -0,0 +1,59 @@
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 36) fe80::1 > ff02::5: OSPFv3, Hello, length 36
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router]
+ Hello Timer 10s, Dead Timer 40s, Interface-ID 0.0.0.5, Priority 1
+ Neighbor List:
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 36) fe80::1 > ff02::5: OSPFv3, Hello, length 36
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router]
+ Hello Timer 10s, Dead Timer 40s, Interface-ID 0.0.0.5, Priority 1
+ Neighbor List:
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 36) fe80::1 > ff02::5: OSPFv3, Hello, length 36
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router]
+ Hello Timer 10s, Dead Timer 40s, Interface-ID 0.0.0.5, Priority 1
+ Neighbor List:
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 36) fe80::1 > ff02::5: OSPFv3, Hello, length 36
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router]
+ Hello Timer 10s, Dead Timer 40s, Interface-ID 0.0.0.5, Priority 1
+ Neighbor List:
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 36) fe80::2 > ff02::5: OSPFv3, Hello, length 36
+ Router-ID 2.2.2.2, Area 0.0.0.1
+ Options [V6, External, Router]
+ Hello Timer 10s, Dead Timer 40s, Interface-ID 0.0.0.5, Priority 1
+ Neighbor List:
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 40) fe80::1 > ff02::5: OSPFv3, Hello, length 40
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router]
+ Hello Timer 10s, Dead Timer 40s, Interface-ID 0.0.0.5, Priority 1
+ Designated Router 1.1.1.1
+ Neighbor List: [|ospf3]
+IP6 (class 0xe0, flowlabel 0x00100, hlim 1, next-header OSPF (89) payload length: 28) fe80::2 > fe80::1: OSPFv3, Database Description, length 28
+ Router-ID 2.2.2.2, Area 0.0.0.1
+ Options [V6, External, Router], DD Flags [Init, More, Master], MTU 1500, DD-Sequence 0x00001d46
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 28) fe80::1 > fe80::2: OSPFv3, Database Description, length 28
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router], DD Flags [Init, More, Master], MTU 1500, DD-Sequence 0x0000242c
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 168) fe80::1 > fe80::2: OSPFv3, Database Description, length 168
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router], DD Flags [More], MTU 1500, DD-Sequence 0x00001d46 [|ospf3]
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 148) fe80::2 > fe80::1: OSPFv3, Database Description, length 148
+ Router-ID 2.2.2.2, Area 0.0.0.1
+ Options [V6, External, Router], DD Flags [More, Master], MTU 1500, DD-Sequence 0x00001d47 [|ospf3]
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 28) fe80::1 > fe80::2: OSPFv3, Database Description, length 28
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Options [V6, External, Router], DD Flags [none], MTU 1500, DD-Sequence 0x00001d47
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 100) fe80::2 > fe80::1: OSPFv3, LS-Request, length 100
+ Router-ID 2.2.2.2, Area 0.0.0.1
+ Advertising Router 1.1.1.1
+ Router LSA (1), Area Local Scope, LSA-ID 0.0.0.0 [|ospf3]
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 88) fe80::1 > fe80::2: OSPFv3, LS-Request, length 88
+ Router-ID 1.1.1.1, Area 0.0.0.1
+ Advertising Router 2.2.2.2
+ Router LSA (1), Area Local Scope, LSA-ID 0.0.0.0 [|ospf3]
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 28) fe80::2 > fe80::1: OSPFv3, Database Description, length 28
+ Router-ID 2.2.2.2, Area 0.0.0.1
+ Options [V6, External, Router], DD Flags [Master], MTU 1500, DD-Sequence 0x00001d48
+IP6 (class 0xe0, hlim 1, next-header OSPF (89) payload length: 288) fe80::1 > fe80:0:ff:ffff:f000::2: OSPFv3, LS-Update, length 288
+ Router-ID 1.1.1.1, Area 0.0.0.1 [|ospf3]
diff --git a/tests/ospf6_print_lshdr-oobr.pcapng b/tests/ospf6_print_lshdr-oobr.pcapng
new file mode 100644
index 0000000..9f96af6
--- /dev/null
+++ b/tests/ospf6_print_lshdr-oobr.pcapng
Binary files differ
diff --git a/tests/pcap-invalid-version-1.out b/tests/pcap-invalid-version-1.out
index 5edcdda..562d0bc 100644
--- a/tests/pcap-invalid-version-1.out
+++ b/tests/pcap-invalid-version-1.out
@@ -1 +1,2 @@
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/pcap-invalid-version-1.out.stderr b/tests/pcap-invalid-version-1.out.stderr
new file mode 100644
index 0000000..1036edb
--- /dev/null
+++ b/tests/pcap-invalid-version-1.out.stderr
@@ -0,0 +1 @@
+tcpdump: archaic pcap savefile format
diff --git a/tests/pcap-invalid-version-2.out b/tests/pcap-invalid-version-2.out
index 5edcdda..562d0bc 100644
--- a/tests/pcap-invalid-version-2.out
+++ b/tests/pcap-invalid-version-2.out
@@ -1 +1,2 @@
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/pcap-invalid-version-2.out.stderr b/tests/pcap-invalid-version-2.out.stderr
new file mode 100644
index 0000000..4171b8e
--- /dev/null
+++ b/tests/pcap-invalid-version-2.out.stderr
@@ -0,0 +1 @@
+tcpdump: unsupported pcap savefile version 2.5
diff --git a/tests/pcap-ng-invalid-vers-1.out b/tests/pcap-ng-invalid-vers-1.out
deleted file mode 100644
index 5edcdda..0000000
--- a/tests/pcap-ng-invalid-vers-1.out
+++ /dev/null
@@ -1 +0,0 @@
-EXIT CODE 00000100
diff --git a/tests/pcap-ng-invalid-vers-2.out b/tests/pcap-ng-invalid-vers-2.out
deleted file mode 100644
index 5edcdda..0000000
--- a/tests/pcap-ng-invalid-vers-2.out
+++ /dev/null
@@ -1 +0,0 @@
-EXIT CODE 00000100
diff --git a/tests/pcapng-invalid-vers-1.out b/tests/pcapng-invalid-vers-1.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/pcapng-invalid-vers-1.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/pcapng-invalid-vers-1.out.stderr b/tests/pcapng-invalid-vers-1.out.stderr
new file mode 100644
index 0000000..4213849
--- /dev/null
+++ b/tests/pcapng-invalid-vers-1.out.stderr
@@ -0,0 +1 @@
+tcpdump: unsupported pcapng savefile version 0.1
diff --git a/tests/pcap-ng-invalid-vers-1.pcap b/tests/pcapng-invalid-vers-1.pcapng
index 7bbb7ab..7bbb7ab 100644
--- a/tests/pcap-ng-invalid-vers-1.pcap
+++ b/tests/pcapng-invalid-vers-1.pcapng
Binary files differ
diff --git a/tests/pcapng-invalid-vers-2.out b/tests/pcapng-invalid-vers-2.out
new file mode 100644
index 0000000..562d0bc
--- /dev/null
+++ b/tests/pcapng-invalid-vers-2.out
@@ -0,0 +1,2 @@
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/pcapng-invalid-vers-2.out.stderr b/tests/pcapng-invalid-vers-2.out.stderr
new file mode 100644
index 0000000..4845652
--- /dev/null
+++ b/tests/pcapng-invalid-vers-2.out.stderr
@@ -0,0 +1 @@
+tcpdump: unsupported pcapng savefile version 1.1
diff --git a/tests/pcap-ng-invalid-vers-2.pcap b/tests/pcapng-invalid-vers-2.pcapng
index 77595f4..77595f4 100644
--- a/tests/pcap-ng-invalid-vers-2.pcap
+++ b/tests/pcapng-invalid-vers-2.pcapng
Binary files differ
diff --git a/tests/pktap-heap-overflow.out b/tests/pktap-heap-overflow.out
index e23ed91..d3a600e 100644
--- a/tests/pktap-heap-overflow.out
+++ b/tests/pktap-heap-overflow.out
@@ -1,3 +1,4 @@
[|pktap]
[|ppp]
-EXIT CODE 00000100
+
+EXIT CODE 00000100: dump:0 code: 1
diff --git a/tests/pktap-heap-overflow.out.stderr b/tests/pktap-heap-overflow.out.stderr
new file mode 100644
index 0000000..38f484c
--- /dev/null
+++ b/tests/pktap-heap-overflow.out.stderr
@@ -0,0 +1,2 @@
+reading from file pktap-heap-overflow.pcap, link-type 149
+tcpdump: pcap_loop: invalid packet capture length 4076008178, bigger than snaplen of 1024
diff --git a/tests/relts-0x80000000.pcap b/tests/relts-0x80000000.pcap
index eb825fb..0624709 100644
--- a/tests/relts-0x80000000.pcap
+++ b/tests/relts-0x80000000.pcap
Binary files differ
diff --git a/tests/rpl-19-pickdag.out b/tests/rpl-19-pickdag.out
index d3c41ee..08899db 100644
--- a/tests/rpl-19-pickdag.out
+++ b/tests/rpl-19-pickdag.out
@@ -1 +1 @@
-IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:5431::,seq:10,instance:42,Dagid,40] opt:rpltarget len:25 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0
+IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:5431::,seq:10,instance:42,Dagid,40] opt:rpltarget len:25 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 [|rpl]
diff --git a/tests/rpl-19-pickdagvvv.out b/tests/rpl-19-pickdagvvv.out
index deee033..3db3834 100644
--- a/tests/rpl-19-pickdagvvv.out
+++ b/tests/rpl-19-pickdagvvv.out
@@ -1 +1 @@
-IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:5431::,seq:10,instance:42,Dagid,40] opt:rpltarget len:25 0x0000: 0080 2001 0db8 0001 0000 0216 3eff fe11 0x0010: 3424 0000 0000 00 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0
+IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:5431::,seq:10,instance:42,Dagid,40] opt:rpltarget len:25 0x0000: 0080 2001 0db8 0001 0000 0216 3eff fe11 0x0010: 3424 0000 0000 00 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 [|rpl]
diff --git a/tests/rpl-dao-oobr.out b/tests/rpl-dao-oobr.out
new file mode 100644
index 0000000..e410ee1
--- /dev/null
+++ b/tests/rpl-dao-oobr.out
@@ -0,0 +1 @@
+IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:<elided>,seq:0,instance:42,00] opt:subopt:13 len:2 opt:subopt:128 len:15 opt:subopt:13 len:15 [|rpl]
diff --git a/tests/rpl-dao-oobr.pcapng b/tests/rpl-dao-oobr.pcapng
new file mode 100644
index 0000000..39e95a7
--- /dev/null
+++ b/tests/rpl-dao-oobr.pcapng
Binary files differ
diff --git a/tests/rsvp-rsvp_obj_print-oobr.out b/tests/rsvp-rsvp_obj_print-oobr.out
new file mode 100644
index 0000000..fc1a8c6
--- /dev/null
+++ b/tests/rsvp-rsvp_obj_print-oobr.out
@@ -0,0 +1,7 @@
+TIPC v5.0 226.0.0 > 64.14.1536, headerlength 56 bytes, MessageSize 51914 bytes, Link Changeover Protocol internal, messageType Unknown (0xcacacaca)[|TIPC]
+[|ether]
+IP (tos 0x0, ttl 14, id 44815, offset 0, flags [+, DF, rsvd], proto RSVP (46), length 40, bad cksum 3280 (->c411)!)
+ 250.219.91.71 > 20.100.238.255:
+ RSVPv1 Hello Message (20), Flags: [none], length: 16384, ttl: 0, checksum: 0x000e
+ Class Type (old) Object (125) Flags: [reject if unknown], Class-Type: 1 (1), length: 4
+ [|rsvp]
diff --git a/tests/rsvp-rsvp_obj_print-oobr.pcap b/tests/rsvp-rsvp_obj_print-oobr.pcap
new file mode 100644
index 0000000..c12da8d
--- /dev/null
+++ b/tests/rsvp-rsvp_obj_print-oobr.pcap
Binary files differ
diff --git a/tests/rx_serviceid_oobr.out b/tests/rx_serviceid_oobr.out
new file mode 100644
index 0000000..f2c0e2a
--- /dev/null
+++ b/tests/rx_serviceid_oobr.out
@@ -0,0 +1,3 @@
+IP 250.15.128.19.68 > 249.251.157.8.63246: BOOTP/DHCP, unknown (0x00), length 8085
+[|ether]
+IP 0.0.0.0.0 > 0.0.0.0.7004: rx abort (539)
diff --git a/tests/rx_serviceid_oobr.pcap b/tests/rx_serviceid_oobr.pcap
new file mode 100644
index 0000000..8bc1a75
--- /dev/null
+++ b/tests/rx_serviceid_oobr.pcap
Binary files differ
diff --git a/tests/smb.sh b/tests/smb.sh
new file mode 100644
index 0000000..4502354
--- /dev/null
+++ b/tests/smb.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+srcdir=${1-..}
+: echo smb.sh using ${srcdir} from `pwd`
+
+testdir=${srcdir}/tests
+
+exitcode=0
+passedfile=tests/.passed
+failedfile=tests/.failed
+passed=`cat ${passedfile}`
+failed=`cat ${failedfile}`
+
+# Only attempt OpenSSL-specific tests when compiled with the library.
+
+if grep '^#define ENABLE_SMB 1$' config.h >/dev/null
+then
+ cat ${srcdir}/tests/SMBLIST | while read name input output options
+ do
+ case $name in
+ \#*) continue;;
+ '') continue;;
+ esac
+ rm -f core
+ [ "$only" != "" -a "$name" != "$only" ] && continue
+ SRCDIR=${srcdir}
+ export SRCDIR
+ # I hate shells with their stupid, useless subshells.
+ passed=`cat ${passedfile}`
+ failed=`cat ${failedfile}`
+ (cd tests # run TESTonce in tests directory
+ if ${srcdir}/tests/TESTonce $name ${srcdir}/tests/$input ${srcdir}/tests/$output "$options"
+ then
+ passed=`expr $passed + 1`
+ echo $passed >${passedfile}
+ else
+ failed=`expr $failed + 1`
+ echo $failed >${failedfile}
+ fi
+ if [ -d COREFILES ]; then
+ if [ -f core ]; then mv core COREFILES/$name.core; fi
+ fi)
+ done
+ # I hate shells with their stupid, useless subshells.
+ passed=`cat ${passedfile}`
+ failed=`cat ${failedfile}`
+fi
+
+exit $exitcode
diff --git a/tests/smb_print_trans-oobr1.out b/tests/smb_print_trans-oobr1.out
new file mode 100644
index 0000000..1e5dfaf
--- /dev/null
+++ b/tests/smb_print_trans-oobr1.out
@@ -0,0 +1,39 @@
+IPX a8f87967.00:00:00:00:00:01.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
+IPX a8f87967.00:00:00:00:00:01.0455 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
+IPX a8f87967.00:00:00:ff:ff:ff.7f55 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 50
+IPX a855000b.41:44:4d:49:4e:54.4553 > 00000000.ff:ff:ff:ff:ff:ff.0455: ipx-netbios 162
+>>> IPX transport Data: (24 bytes)
+[000] 54 20 20 20 20 20 20 00 01 02 5F 5F 4D 53 26 52 T \0x00 \0x01\0x02__MS&R
+[010] 4F 57 53 45 5F 5F 02 01 OWSE__\0x02\0x01
+
+SMB PACKET: SMBtrans (REQUEST)
+SMB Command = 0x25
+Error class = 0x0
+Error code = 0 (0x0)
+Flags1 = 0x0
+Flags2 = 0x0
+Tree ID = 0 (0x0)
+Proc ID = 0 (0x0)
+UID = 0 (0x0)
+MID = 0 (0x0)
+Word Count = 17 (0x11)
+TotParamCnt=0 (0x0)
+TotDataCnt=42 (0x2a)
+MaxParmCnt=0 (0x0)
+MaxDataCnt=0 (0x0)
+MaxSCnt=0 (0x0)
+TransFlags=0x0
+Res1=0x3E8
+Res2=0x0
+Res3=0x0
+ParamCnt=0 (0x0)
+ParamOff=0 (0x0)
+DataCnt=42 (0x2a)
+DataOff=86 (0x56)
+SUCnt=3 (0x3)
+Data: (6 bytes)
+[000] 01 00 01 00 02 00 \0x01\0x00\0x01\0x00\0x02\0x00
+smb_bcc=59
+[|SMB]
+
+
diff --git a/tests/smb_print_trans-oobr1.pcapng b/tests/smb_print_trans-oobr1.pcapng
new file mode 100644
index 0000000..44e6459
--- /dev/null
+++ b/tests/smb_print_trans-oobr1.pcapng
Binary files differ
diff --git a/tests/smb_print_trans-oobr2.out b/tests/smb_print_trans-oobr2.out
new file mode 100644
index 0000000..1b3d99e
--- /dev/null
+++ b/tests/smb_print_trans-oobr2.out
@@ -0,0 +1,37 @@
+IP (tos 0x0, ttl 128, id 14471, offset 0, flags [none], proto UDP (17), length 207)
+ 192.168.1.249.138 > 192.168.1.255.138:
+>>> NBT UDP PACKET(138) Res=0x110E ID=0x891D IP=192 (0xc0).168 (0xa8).1 (0x1).249 (0xf9) Port=138 (0x8a) Length=165 (0xa5) Res2=0x0
+SourceName=DJP95S0J NameType=0x00 (Workstation)
+DestName=ARBEIT NameType=0x00 (Workstation)
+
+SMB PACKET: SMBtrans (REQUEST)
+SMB Command = 0x25
+Error class = 0x0
+Error code = 0 (0x0)
+Flags1 = 0x0
+Flags2 = 0x0
+Tree ID = 0 (0x0)
+Proc ID = 0 (0x0)
+UID = 0 (0x0)
+MID = 0 (0x0)
+Word Count = 17 (0x11)
+TotParamCnt=0 (0x0)
+TotDataCnt=11 (0xb)
+MaxParmCnt=0 (0x0)
+MaxDataCnt=0 (0x0)
+MaxSCnt=0 (0x0)
+TransFlags=0x0
+Res1=0x3E8
+Res2=0x0
+Res3=0x0
+ParamCnt=0 (0x0)
+ParamOff=0 (0x0)
+DataCnt=11 (0xb)
+DataOff=86 (0x56)
+SUCnt=3 (0x3)
+Data: (6 bytes)
+[000] 01 00 01 00 02 00 \0x01\0x00\0x01\0x00\0x02\0x00
+smb_bcc=28
+[|SMB]
+
+
diff --git a/tests/smb_print_trans-oobr2.pcap b/tests/smb_print_trans-oobr2.pcap
new file mode 100644
index 0000000..485a5d8
--- /dev/null
+++ b/tests/smb_print_trans-oobr2.pcap
Binary files differ
diff --git a/tests/stp-v4-length-sigsegv.pcap b/tests/stp-v4-length-sigsegv.pcap
index b6ae2ac..bfd1c83 100644
--- a/tests/stp-v4-length-sigsegv.pcap
+++ b/tests/stp-v4-length-sigsegv.pcap
Binary files differ
diff --git a/tests/tftp-heapoverflow.pcap b/tests/tftp-heapoverflow.pcap
index c8800f6..3f079fd 100644
--- a/tests/tftp-heapoverflow.pcap
+++ b/tests/tftp-heapoverflow.pcap
Binary files differ
diff --git a/tests/vrrp-vrrp_print-oobr-2.out b/tests/vrrp-vrrp_print-oobr-2.out
new file mode 100644
index 0000000..9f1ccbb
--- /dev/null
+++ b/tests/vrrp-vrrp_print-oobr-2.out
@@ -0,0 +1,20 @@
+IP (tos 0x2,ECT(0), ttl 35, id 48399, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7f (->c1ae)!)
+ 0.3.2.148 > 54.0.0.16: vrrp 0.3.2.148 > 54.0.0.16: VRRPv3, Advertisement, (ttl 35), vrid 255, prio 17, intvl 269cs, length 19, addrs(3):[|vrrp]
+IP (tos 0x2,ECT(0), ttl 35, id 40207, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7e (->e1b5)!)
+ 255.251.2.148 > 54.0.0.16: vrrp 255.251.2.148 > 54.0.0.16: VRRPv3, Advertisement, (ttl 35), vrid 255, prio 17, intvl 2304cs, length 19, addrs(3):[|vrrp]
+IP (tos 0x2,ECT(0), ttl 35, id 40207, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 597f (->e1ae)!)
+ 0.3.2.148 > 54.0.0.16: vrrp 0.3.2.148 > 54.0.0.16: VRRPv3, Advertisement, (ttl 35), vrid 255, prio 17, intvl 256cs, length 19, addrs(3):[|vrrp]
+IP (tos 0x2,ECT(0), ttl 35, id 40207, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7f (->e154)!)
+ 0.3.2.148 > 54.90.0.16: vrrp 0.3.2.148 > 54.90.0.16: VRRPv3, Advertisement, (ttl 35), vrid 255, prio 17, intvl 256cs, length 19, addrs(3):[|vrrp]
+IP (tos 0x2,ECT(0), ttl 35, id 40207, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7f (->e1ae)!)
+ 0.3.2.148 > 54.0.0.16: vrrp 0.3.2.148 > 54.0.0.16: VRRPv3, Advertisement, (ttl 35), vrid 0, prio 4, intvl 2304cs, length 19, addrs:
+IP (tos 0x2,ECT(0), ttl 35, id 48399, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7f (->c1ae)!)
+ 0.3.2.148 > 54.0.0.16: vrrp 0.3.2.148 > 54.0.0.16: VRRPv3, Advertisement, (ttl 35), vrid 255, prio 17, intvl 256cs, length 19, addrs(3):[|vrrp]
+IP (tos 0x2,ECT(0), ttl 35, id 40207, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7f (->e1ae)!)
+ 0.3.2.148 > 54.0.0.16: vrrp 0.3.2.148 > 54.0.0.16: VRRPv3, Advertisement, (ttl 35), vrid 255, prio 17, intvl 256cs, length 19, addrs(3):[|vrrp]
+IP (tos 0x2,ECT(0), ttl 34, id 40207, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 27, bad cksum 7f (->e260)!)
+ 0.3.2.148 > 54.90.0.16: vrrp 0.3.2.148 > 54.90.0.16: VRRPv3, Advertisement, (ttl 34), vrid 255, prio 17, intvl 256cs, length 7[|vrrp]
+IP (tos 0x2,ECT(0), ttl 35, id 40207, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7f (->17af)!)
+ 0.3.2.148 > 0.0.0.16: vrrp 0.3.2.148 > 0.0.0.16: VRRPv3, Advertisement, (ttl 35), vrid 0, prio 4, intvl 2304cs, length 19, addrs:
+IP (tos 0x2,ECT(0), ttl 35, id 48399, offset 0, flags [+, DF, rsvd], proto VRRP (112), length 39, bad cksum 7f (->2e8a)!)
+ 242.242.242.242 > 242.242.242.242: vrrp 242.242.242.242 > 242.242.242.242: VRRPv15, unknown type (2), (ttl 35)
diff --git a/tests/vrrp-vrrp_print-oobr-2.pcap b/tests/vrrp-vrrp_print-oobr-2.pcap
new file mode 100644
index 0000000..b0edc24
--- /dev/null
+++ b/tests/vrrp-vrrp_print-oobr-2.pcap
Binary files differ
diff --git a/tests/vrrp-vrrp_print-oobr.out b/tests/vrrp-vrrp_print-oobr.out
new file mode 100644
index 0000000..fd87db8
--- /dev/null
+++ b/tests/vrrp-vrrp_print-oobr.out
@@ -0,0 +1,6 @@
+IP (tos 0x7f,CE, ttl 254, id 40208, offset 0, flags [none], proto VRRP (112), length 34, options (unknown 69 [bad length 83]), bad cksum 8e15 (->bc96)!)
+ 250.219.91.20 > 209.150.251.64: vrrp 250.219.91.20 > 209.150.251.64: VRRPv2, Advertisement, (ttl 254), vrid 2, prio 0, authtype simple, intvl 255s, length 6[|vrrp]
+IP (tos 0x7f,CE, ttl 254, id 40208, offset 0, flags [none], proto VRRP (112), length 40, options (unknown 69 [bad length 83]), bad cksum 8e15 (->b790)!)
+ 250.219.91.20 > 209.150.251.64: vrrp 250.219.91.20 > 209.150.251.64: VRRPv2, Advertisement, (ttl 254), vrid 2, prio 0, authtype simple, intvl 255s, length 12, addrs:[|vrrp]
+IP (tos 0x7f,CE, ttl 254, id 40208, offset 0, flags [none], proto VRRP (112), length 40, options (unknown 69 [bad length 83]), bad cksum 8e15 (->bc90)!)
+ 250.219.91.20 > 209.150.251.64: vrrp 250.219.91.20 > 209.150.251.64: VRRPv2, Advertisement, (ttl 254), vrid 2, prio 0, authtype simple, intvl 255s, length 12, addrs:[|vrrp]
diff --git a/tests/vrrp-vrrp_print-oobr.pcap b/tests/vrrp-vrrp_print-oobr.pcap
new file mode 100644
index 0000000..a74bc50
--- /dev/null
+++ b/tests/vrrp-vrrp_print-oobr.pcap
Binary files differ