Skip to content

Commit 955edd8

Browse files
Lukasz Majewskikuba-moo
authored andcommitted
selftests: hsr: Extend the hsr_redbox.sh test to use fixed MAC addresses
Fixed MAC addresses help with debugging as last four bytes identify the network namespace. Moreover, it allows to mimic the real life setup with for example bridge having the same MAC address on each port. Signed-off-by: Lukasz Majewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d223d19 commit 955edd8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/testing/selftests/net/hsr/hsr_redbox.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@ setup_hsr_interfaces()
9696
ip -n "${ns4}" link set ns4eth1 up
9797
ip -n "${ns5}" link set ns5eth1 up
9898

99+
ip -net "$ns1" link set address 00:11:22:00:01:01 dev ns1eth1
100+
ip -net "$ns1" link set address 00:11:22:00:01:02 dev ns1eth2
101+
102+
ip -net "$ns2" link set address 00:11:22:00:02:01 dev ns2eth1
103+
ip -net "$ns2" link set address 00:11:22:00:02:02 dev ns2eth2
104+
ip -net "$ns2" link set address 00:11:22:00:02:03 dev ns2eth3
105+
106+
ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth1
107+
ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth2
108+
ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3eth3
109+
ip -net "$ns3" link set address 00:11:22:00:03:11 dev ns3br1
110+
111+
ip -net "$ns4" link set address 00:11:22:00:04:01 dev ns4eth1
112+
ip -net "$ns5" link set address 00:11:22:00:05:01 dev ns5eth1
113+
99114
ip -net "${ns1}" link add name hsr1 type hsr slave1 ns1eth1 slave2 ns1eth2 supervision 45 version ${HSRv} proto 0
100115
ip -net "${ns2}" link add name hsr2 type hsr slave1 ns2eth1 slave2 ns2eth2 interlink ns2eth3 supervision 45 version ${HSRv} proto 0
101116

0 commit comments

Comments
 (0)