aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-10-28 13:36:45 -0700
committerFlorin Coras <florin.coras@gmail.com>2018-10-29 03:26:39 +0000
commitf23890138e02d4218c828c427f687f8ecdb0e165 (patch)
tree35662ae470e81b5ba14c84b95d538f5b696539d6 /src
parent878b65aa6c16b6013e75ea9039b9978c52982e97 (diff)
bond: problem switching from l2 to l3
when the last interface is removed from l2 in the bonding group, we should invoke ethernet_set_rx_direct to allow ip packets to go directly to ip4-input. Change-Id: I43b3cd64e2c119762edd0c295bb9348732adab45 Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/bonding/device.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/bonding/device.c b/src/vnet/bonding/device.c
index e2459db3d29..13ff644fd73 100644
--- a/src/vnet/bonding/device.c
+++ b/src/vnet/bonding/device.c
@@ -104,6 +104,17 @@ bond_set_l2_mode_function (vnet_main_t * vnm,
ethernet_set_rx_redirect (vnm, sif_hw, 1);
}
}
+ else if ((bif_hw->l2_if_count == 0) && (l2_if_adjust == -1))
+ {
+ /* Just removed last L2 subinterface on this port */
+ vec_foreach (sw_if_index, bif->slaves)
+ {
+ sif_hw = vnet_get_sup_hw_interface (vnm, *sw_if_index);
+
+ /* Allow ip packets to go directly to ip4-input etc */
+ ethernet_set_rx_redirect (vnm, sif_hw, 0);
+ }
+ }
return 0;
}