Skip to content

Commit 1a635d3

Browse files
vladimirolteanPaolo Abeni
authored andcommitted
selftests: forwarding: fix learning_test when h1 supports IFF_UNICAST_FLT
The first host interface has by default no interest in receiving packets MAC DA de:ad:be:ef:13:37, so it might drop them before they hit the tc filter and this might confuse the selftest. Enable promiscuous mode such that the filter properly counts received packets. Fixes: d4deb01 ("selftests: forwarding: Add a test for FDB learning") Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Tested-by: Ido Schimmel <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent b8e629b commit 1a635d3

File tree

1 file changed

+2
-0
lines changed
  • tools/testing/selftests/net/forwarding

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
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
@@ -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

0 commit comments

Comments
 (0)