Skip to content

Commit ece69f0

Browse files
committed
tests: add tests for ERSPAN Type I and Type II.
1 parent 79dd6f0 commit ece69f0

15 files changed

+1422
-0
lines changed

tests/TESTLIST

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,15 @@ bfd-raw-auth-md5-v bfd-raw-auth-md5.pcap bfd-raw-auth-md5-v.out -v
558558
bfd-raw-auth-sha1 bfd-raw-auth-sha1.pcap bfd-raw-auth-sha1.out
559559
bfd-raw-auth-sha1-v bfd-raw-auth-sha1.pcap bfd-raw-auth-sha1-v.out -v
560560

561+
# ERSPAN tests
562+
erspan-type-i-1 erspan-type-i-1.pcap erspan-type-i-1.out -v
563+
erspan-type-i-2 erspan-type-i-2.pcap erspan-type-i-2.out -v
564+
erspan-type-i-3 erspan-type-i-3.pcap erspan-type-i-3.out -v
565+
erspan-type-i-4 erspan-type-i-4.pcap erspan-type-i-4.out -v
566+
erspan-type-ii-1 erspan-type-ii-1.pcap erspan-type-ii-1.out -v
567+
erspan-type-ii-2 erspan-type-ii-2.pcap erspan-type-ii-2.out -v
568+
erspan-type-ii-3 erspan-type-ii-3.pcap erspan-type-ii-3.out -v
569+
561570
# bad packets from Hanno Böck
562571
# heap-overflow-1 is in non-bsd.tests
563572
heap-overflow-2 heap-overflow-2.pcap heap-overflow-2.out -v

tests/erspan-type-i-1.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
1 13:09:59.174316 IP (tos 0xfc, ttl 32, id 0, offset 0, flags [none], proto GRE (47), length 126)
2+
1.1.1.1 > 192.168.255.5: GREv0, Flags [none], length 106
3+
erspan type1: IP (tos 0x0, ttl 255, id 40771, offset 0, flags [none], proto ICMP (1), length 84)
4+
10.52.128.233 > 10.52.128.234: ICMP echo request, id 44114, seq 3, length 64
5+
2 13:09:59.174822 IP (tos 0xfc, ttl 32, id 0, offset 0, flags [none], proto GRE (47), length 126)
6+
1.1.1.1 > 192.168.255.5: GREv0, Flags [none], length 106
7+
erspan type1: IP (tos 0x0, ttl 255, id 40771, offset 0, flags [none], proto ICMP (1), length 84)
8+
10.52.128.234 > 10.52.128.233: ICMP echo reply, id 44114, seq 3, length 64

tests/erspan-type-i-1.pcap

336 Bytes
Binary file not shown.

tests/erspan-type-i-2.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
1 13:09:59.174316 IP (tos 0xfc, ttl 32, id 0, offset 0, flags [none], proto GRE (47), length 126)
2+
1.1.1.1 > 192.168.255.5: GREv0, Flags [none], length 106
3+
erspan type1: IP (tos 0x0, ttl 255, id 40771, offset 0, flags [none], proto ICMP (1), length 84)
4+
10.52.128.233 > 10.52.128.234: ICMP echo request, id 44114, seq 3, length 64
5+
2 13:09:59.174822 IP (tos 0xfc, ttl 32, id 0, offset 0, flags [none], proto GRE (47), length 126)
6+
1.1.1.1 > 192.168.255.5: GREv0, Flags [none], length 106
7+
erspan type1: IP (tos 0x0, ttl 255, id 40771, offset 0, flags [none], proto ICMP (1), length 84)
8+
10.52.128.234 > 10.52.128.233: ICMP echo reply, id 44114, seq 3, length 64

tests/erspan-type-i-2.pcap

336 Bytes
Binary file not shown.

tests/erspan-type-i-3.out

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1 14:37:10.555050 IP (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto GRE (47), length 88)
2+
192.168.90.17 > 192.168.90.127: GREv0, Flags [none], length 68
3+
erspan type1: ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.90.253 tell 192.168.90.100, length 46

tests/erspan-type-i-3.pcap

142 Bytes
Binary file not shown.

tests/erspan-type-i-4.out

Lines changed: 800 additions & 0 deletions
Large diffs are not rendered by default.

tests/erspan-type-i-4.pcap

15.7 KB
Binary file not shown.

tests/erspan-type-ii-1.out

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
1 18:53:28.139390 IP (tos 0xfc, ttl 251, id 171, offset 0, flags [DF], proto GRE (47), length 108)
2+
1.1.1.2 > 192.168.255.5: GREv0, Flags [sequence# present], seq 171, length 88
3+
erspan type2 session 666 cos 6 index 32760: IP (tos 0xc0, ttl 1, id 23540, offset 0, flags [none], proto PIM (103), length 58)
4+
10.48.6.1 > 224.0.0.13: PIMv2, length 38
5+
Hello, cksum 0xc530 (correct)
6+
Hold Time Option (1), length 2, Value: 1m45s
7+
Generation ID Option (20), length 4, Value: 0x2c6ceec0
8+
DR Priority Option (19), length 4, Value: 1
9+
State Refresh Capability Option (21), length 4, Value: v1
10+
Unknown Option (65004), length 0, Value:

0 commit comments

Comments
 (0)