Skip to content

Commit

Permalink
Merge branch 'fix-bridge_vlan_aware-sh-and-bridge_vlan_unaware-sh-wit…
Browse files Browse the repository at this point in the history
…h-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/20220703073626.937785-1-vladimir.oltean@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Paolo Abeni committed Jul 5, 2022
2 parents 7e8c182 + 83844aa commit 029cc09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/testing/selftests/net/forwarding/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ learning_test()
# FDB entry was installed.
bridge link set dev $br_port1 flood off

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

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

tc filter del dev $host1_if ingress protocol ip pref 1 handle 101 flower
tc qdisc del dev $host1_if ingress
ip link set $host1_if promisc off

bridge link set dev $br_port1 flood on

Expand All @@ -1306,6 +1308,7 @@ flood_test_do()

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

tc filter del dev $host2_if ingress protocol ip pref 1 handle 101 flower
tc qdisc del dev $host2_if ingress
ip link set $host2_if promisc off

return $err
}
Expand Down

0 comments on commit 029cc09

Please sign in to comment.