When removing a VLAN interface from a 802.1d bridge one needs to do a
proper cleanup, so that the interface will direct traffic to CPU
instead.
Remove a VLAN interface from a bridge and check that ping works.
Cc: Andrew Lunn <andrew(a)lunn.ch>
Cc: Vivien Didelot <vivien.didelot(a)savoirfairelinux.com>
Signed-off-by: Ido Schimmel <idosch(a)mellanox.com>
---
v1->v2:
* No change.
---
recipes/switchdev/l2-010-bridge_vlan1d_sanity.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py
b/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py
index 2c0062f..b30f741 100644
--- a/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py
+++ b/recipes/switchdev/l2-010-bridge_vlan1d_sanity.py
@@ -34,9 +34,9 @@ def do_task(ctl, hosts, ifaces, aliases):
br_options = {"vlan_filtering": 1}
sw.create_bridge(slaves=[sw_if1, sw_if2], options=br_options)
- sw_if1_10 = sw.create_vlan(sw_if1, 10)
+ sw_if1_10 = sw.create_vlan(sw_if1, 10, ip=test_ip(2, 3))
sw_if2_10 = sw.create_vlan(sw_if2, 10)
- sw.create_bridge(slaves=[sw_if1_10, sw_if2_10], options=br_options)
+ sw_br = sw.create_bridge(slaves=[sw_if1_10, sw_if2_10], options=br_options)
sw_if1_20 = sw.create_vlan(sw_if1, 20)
sw_if2_21 = sw.create_vlan(sw_if2, 21)
@@ -50,6 +50,12 @@ def do_task(ctl, hosts, ifaces, aliases):
tl.ping_simple(m1_if1_20, m2_if1_21)
tl.ping_simple(m1_if1_30, m2_if1_30, fail_expected=True)
+ sw_br.slave_del(sw_if1_10.get_id())
+
+ sleep(5)
+
+ tl.ping_simple(sw_if1_10, m1_if1_10)
+
do_task(ctl, [ctl.get_host("machine1"),
ctl.get_host("machine2"),
ctl.get_host("switch")],
--
2.4.10