Skip to content

Commit 029cc09

Browse files
author
Paolo Abeni
committed
Merge branch 'fix-bridge_vlan_aware-sh-and-bridge_vlan_unaware-sh-with-iff_unicast_flt'
Vladimir Oltean says: ==================== Fix bridge_vlan_aware.sh and bridge_vlan_unaware.sh with IFF_UNICAST_FLT Make sure that h1 and h2 don't drop packets with a random MAC DA, which otherwise confuses these selftests. Also, fix an incorrect error message found during those failures. ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
2 parents 7e8c182 + 83844aa commit 029cc09

File tree

1 file changed

+5
-1
lines changed
  • tools/testing/selftests/net/forwarding

1 file changed

+5
-1
lines changed

tools/testing/selftests/net/forwarding/lib.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,7 @@ learning_test()
12401240
# FDB entry was installed.
12411241
bridge link set dev $br_port1 flood off
12421242

1243+
ip link set $host1_if promisc on
12431244
tc qdisc add dev $host1_if ingress
12441245
tc filter add dev $host1_if ingress protocol ip pref 1 handle 101 \
12451246
flower dst_mac $mac action drop
@@ -1250,7 +1251,7 @@ learning_test()
12501251
tc -j -s filter show dev $host1_if ingress \
12511252
| jq -e ".[] | select(.options.handle == 101) \
12521253
| select(.options.actions[0].stats.packets == 1)" &> /dev/null
1253-
check_fail $? "Packet reached second host when should not"
1254+
check_fail $? "Packet reached first host when should not"
12541255

12551256
$MZ $host1_if -c 1 -p 64 -a $mac -t ip -q
12561257
sleep 1
@@ -1289,6 +1290,7 @@ learning_test()
12891290

12901291
tc filter del dev $host1_if ingress protocol ip pref 1 handle 101 flower
12911292
tc qdisc del dev $host1_if ingress
1293+
ip link set $host1_if promisc off
12921294

12931295
bridge link set dev $br_port1 flood on
12941296

@@ -1306,6 +1308,7 @@ flood_test_do()
13061308

13071309
# Add an ACL on `host2_if` which will tell us whether the packet
13081310
# was flooded to it or not.
1311+
ip link set $host2_if promisc on
13091312
tc qdisc add dev $host2_if ingress
13101313
tc filter add dev $host2_if ingress protocol ip pref 1 handle 101 \
13111314
flower dst_mac $mac action drop
@@ -1323,6 +1326,7 @@ flood_test_do()
13231326

13241327
tc filter del dev $host2_if ingress protocol ip pref 1 handle 101 flower
13251328
tc qdisc del dev $host2_if ingress
1329+
ip link set $host2_if promisc off
13261330

13271331
return $err
13281332
}

0 commit comments

Comments
 (0)