Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: bridge_fdb_local_vlan_0: Test FDB vs. NET_ADDR_SET behavior

The previous patch fixed an issue whereby no FDB entry would be created for
the bridge itself on VLAN 0 under some circumstances. This could break
forwarding. Add a test for the fix.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/137cc25396f5a4f407267af895a14bc45552ba5f.1758550408.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Petr Machata and committed by
Jakub Kicinski
f67e9ae7 cd9a9562

+24 -4
+24 -4
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh
··· 27 27 test_d_sharing 28 28 test_q_no_sharing 29 29 test_q_sharing 30 + test_addr_set 30 31 " 31 32 32 33 NUM_NETIFS=6 ··· 111 110 switch_create 112 111 } 113 112 114 - adf_bridge_create() 113 + adf_bridge_configure() 115 114 { 116 115 local dev 117 - local mac 118 116 119 - ip_link_add br up type bridge vlan_default_pvid 0 "$@" 120 - mac=$(mac_get br) 121 117 ip_addr_add br 192.0.2.3/28 122 118 ip_addr_add br 2001:db8:1::3/64 123 119 ··· 128 130 bridge_vlan_add dev "$dev" vid 2 129 131 bridge_vlan_add dev "$dev" vid 3 130 132 done 133 + } 131 134 135 + adf_bridge_create() 136 + { 137 + local mac 138 + 139 + ip_link_add br up type bridge vlan_default_pvid 0 "$@" 140 + mac=$(mac_get br) 141 + adf_bridge_configure 132 142 ip_link_set_addr br "$mac" 133 143 } 134 144 ··· 373 367 do_test_sharing 1 374 368 } 375 369 370 + adf_addr_set_bridge_create() 371 + { 372 + ip_link_add br up type bridge vlan_filtering 0 373 + ip_link_set_addr br "$(mac_get br)" 374 + adf_bridge_configure 375 + } 376 + 377 + test_addr_set() 378 + { 379 + adf_addr_set_bridge_create 380 + setup_wait 381 + 382 + do_end_to_end_test "$(mac_get br)" "NET_ADDR_SET: end to end, br MAC" 383 + } 376 384 377 385 trap cleanup EXIT 378 386