Skip to content

Commit 14331d8

Browse files
fennerfxlb
authored andcommitted
Add pcap file to exercise corner cases for BGP shutdown message printer
This pcap file contains 3 corner cases: 1. A packet with more data than the length provides for 2. A packet that has a shutdown message with zero data 3. A packet whose shutdown message length is longer than the remaining data in the notification
1 parent f0e6c53 commit 14331d8

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

tests/TESTLIST

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ bgp-llgr bgp-evpn.pcap bgp-llgr.out -v
6060
bgp-encap bgp-encap.pcap bgp-encap.out -v
6161
bgp-rt-prefix bgp-rt-prefix.pcap bgp-rt-prefix.out -v
6262
bgp-extended-shutdown-msg bgp-extended-shutdown-msg.pcapng bgp-extended-shutdown-msg.out -v
63+
bgp-shutdown-msg-variations bgp-shutdown-msg-variations.pcap bgp-shutdown-msg-variations.out -v
6364
bgp-link-bw-extcommunity bgp-link-bw-extcommunity.pcapng bgp-link-bw-extcommunity.out -v
6465
bgp-extended-msg bgp-extended-msg.pcapng bgp-extended-msg.out -v
6566
bgp-enhanced-route-refresh bgp-enhanced-route-refresh.pcapng bgp-enhanced-route-refresh.out -v

tests/bgp-shutdown-msg-variations.out

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
1 01:19:23.958779 IP (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto TCP (6), length 81)
2+
127.0.0.1.20 > 127.0.0.1.179: Flags [S], cksum 0xa709 (correct), seq 0:41, win 8192, length 41: BGP
3+
Notification Message (3), length: 41, Cease (6), subcode Administrative Reset (4), Shutdown Communication (length: 10): "0123456789", Data: (length: 9)
4+
0x0000: 4578 7472 6144 6174 61
5+
2 01:19:23.960010 IP (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto TCP (6), length 62)
6+
127.0.0.1.20 > 127.0.0.1.179: Flags [S], cksum 0x89e7 (correct), seq 0:22, win 8192, length 22: BGP
7+
Notification Message (3), length: 22, Cease (6), subcode Administrative Reset (4), empty Shutdown Communication
8+
3 01:19:23.960948 IP (tos 0x0, ttl 64, id 1, offset 0, flags [none], proto TCP (6), length 72)
9+
127.0.0.1.20 > 127.0.0.1.179: Flags [S], cksum 0x8489 (correct), seq 0:32, win 8192, length 32: BGP
10+
Notification Message (3), length: 32, Cease (6), subcode Administrative Reset (4), invalid Shutdown Communication length, Data: (length: 11)
11+
0x0000: 4030 3132 3334 3536 3738 39
329 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)