Skip to content

Commit 33b82d5

Browse files
committed
HSR/PRP: Add tests
Test setup used: ip link add link veth1 type veth peer name veth2 ip link set dev veth1 up ip link set dev veth2 up ip link add name hsr0 type hsr slave1 veth1 slave2 veth2 version 1 proto 0 ip link set dev hsr0 up And same but with PRP: ip link add name prp0 type hsr slave1 veth1 slave2 veth2 proto 1 Supervision frames are automatically sent out by the kernel on HSR/PRP interfaces. Signed-off-by: Casper Andersson <[email protected]>
1 parent 7f7a2a6 commit 33b82d5

File tree

5 files changed

+42
-0
lines changed

5 files changed

+42
-0
lines changed

tests/TESTLIST

+4
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,10 @@ nhrp-trace nhrp-trace.pcap nhrp-trace.out -v
959959
nhrp nhrp.pcapng nhrp.out -v
960960
pb_nhrp_1 pb_nhrp_1.pcap pb_nhrp_1.out -v
961961

962+
# HSR/PRP tests
963+
hsr hsr.pcap hsr.out -e
964+
prp prp.pcap prp.out -e
965+
962966
# Undefined behavior tests
963967
ip-snmp-leftshift-unsigned ip-snmp-leftshift-unsigned.pcap ip-snmp-leftshift-unsigned.out
964968
ip6-snmp-oid-unsigned ip6-snmp-oid-unsigned.pcap ip6-snmp-oid-unsigned.out

tests/hsr.out

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
1 10:27:45.556140 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6787, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
2+
2 10:27:45.556152 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6787, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
3+
3 10:27:46.580164 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6788, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
4+
4 10:27:46.580176 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6788, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
5+
5 10:27:46.900124 7a:32:3c:8c:19:05 > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6789, LanId B, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38836, PathId 0, DANH 7a:32:3c:8c:19:05
6+
6 10:27:46.900137 3a:d6:01:92:63:1d > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6789, LanId A, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38836, PathId 0, DANH 7a:32:3c:8c:19:05
7+
7 10:27:47.604149 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6790, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
8+
8 10:27:47.604158 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6790, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
9+
9 10:27:48.628147 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6791, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
10+
10 10:27:48.628158 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6791, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
11+
11 10:27:48.920143 7a:32:3c:8c:19:05 > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6792, LanId B, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38837, PathId 0, DANH 7a:32:3c:8c:19:05
12+
12 10:27:48.920154 3a:d6:01:92:63:1d > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6792, LanId A, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38837, PathId 0, DANH 7a:32:3c:8c:19:05
13+
13 10:27:49.652077 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6793, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
14+
14 10:27:49.652086 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6793, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
15+
15 10:27:50.676324 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6794, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
16+
16 10:27:50.676332 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6794, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
17+
17 10:27:50.932131 7a:32:3c:8c:19:05 > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6795, LanId B, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38838, PathId 0, DANH 7a:32:3c:8c:19:05
18+
18 10:27:50.932147 3a:d6:01:92:63:1d > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6795, LanId A, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38838, PathId 0, DANH 7a:32:3c:8c:19:05
19+
19 10:27:51.700163 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6796, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
20+
20 10:27:51.700174 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6796, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
21+
21 10:27:52.724026 7a:32:3c:8c:19:05 > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6797, LanId B, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
22+
22 10:27:52.724036 3a:d6:01:92:63:1d > ff:ff:ff:ff:ff:ff, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6797, LanId A, NetId 0, ethertype ARP (0x0806), Request who-has 142.250.74.110 tell 192.168.0.10, length 46
23+
23 10:27:52.948107 7a:32:3c:8c:19:05 > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6798, LanId B, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38839, PathId 0, DANH 7a:32:3c:8c:19:05
24+
24 10:27:52.948116 3a:d6:01:92:63:1d > 01:15:4e:00:01:00, ethertype HSR (0x892f), length 66: LSDUsize 52, SeqNr 6798, LanId A, NetId 0, ethertype HSR/PRP Supervision (0x88fb), Version 1, SeqNr 38839, PathId 0, DANH 7a:32:3c:8c:19:05

tests/hsr.pcap

1.95 KB
Binary file not shown.

tests/prp.out

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
1 10:34:30.580215 c6:81:06:cb:35:98 > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3263, LanId A, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
2+
2 10:34:30.580224 b2:f0:66:9b:81:1c > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3263, LanId B, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
3+
3 10:34:31.028126 c6:81:06:cb:35:98 > 01:15:4e:00:01:00, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3264, LanId A, ethertype HSR/PRP Supervision (0x88fb), length 66: Version 1, SeqNr 36486, PathId 0, VDAN/DANP c6:81:06:cb:35:98
4+
4 10:34:31.028135 b2:f0:66:9b:81:1c > 01:15:4e:00:01:00, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3264, LanId B, ethertype HSR/PRP Supervision (0x88fb), length 66: Version 1, SeqNr 36486, PathId 0, VDAN/DANP c6:81:06:cb:35:98
5+
5 10:34:31.604157 c6:81:06:cb:35:98 > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3265, LanId A, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
6+
6 10:34:31.604167 b2:f0:66:9b:81:1c > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3265, LanId B, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
7+
7 10:34:32.628138 c6:81:06:cb:35:98 > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3266, LanId A, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
8+
8 10:34:32.628148 b2:f0:66:9b:81:1c > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3266, LanId B, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
9+
9 10:34:33.044029 c6:81:06:cb:35:98 > 01:15:4e:00:01:00, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3267, LanId A, ethertype HSR/PRP Supervision (0x88fb), length 66: Version 1, SeqNr 36487, PathId 0, VDAN/DANP c6:81:06:cb:35:98
10+
10 10:34:33.044039 b2:f0:66:9b:81:1c > 01:15:4e:00:01:00, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3267, LanId B, ethertype HSR/PRP Supervision (0x88fb), length 66: Version 1, SeqNr 36487, PathId 0, VDAN/DANP c6:81:06:cb:35:98
11+
11 10:34:33.652277 c6:81:06:cb:35:98 > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3268, LanId A, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
12+
12 10:34:33.652284 b2:f0:66:9b:81:1c > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3268, LanId B, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
13+
13 10:34:34.676144 c6:81:06:cb:35:98 > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3269, LanId A, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52
14+
14 10:34:34.676155 b2:f0:66:9b:81:1c > ff:ff:ff:ff:ff:ff, PRP trailer (0x88fb), LSDUsize 52, SeqNr 3269, LanId B, ethertype ARP (0x0806), length 66: Request who-has 142.250.74.142 tell 192.168.0.10, length 52

tests/prp.pcap

1.14 KB
Binary file not shown.

0 commit comments

Comments
 (0)