aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2019-04-09 12:18:46 -0700
committerDave Wallace <dwallacelf@gmail.com>2019-04-17 18:17:30 +0000
commit0d7332e43ff156bbfa6305b6e050b6a2d1618a8b (patch)
treef4e54c57cc6ab626c81b5dbbd87f8ddd4ce133a5 /src
parent6545df3b2c700eaf3c54d9f406e22001748f7fe4 (diff)
Revert "Revert "bond: problem switching from l2 to l3"" [VPP-1651]v19.04-rc2
This reverts commit 5d0d5494db58422eb528c0f8b39a86ea966505e9. The csit crash was actually due to the test image missing the patch https://gerrit.fd.io/r/#/c/17731/ It was a mistake to revert the original patch https://gerrit.fd.io/r/#/c/15577/ Change-Id: I7fc563981aa13d308d55b25194fee21475ebc57d Signed-off-by: Steven Luong <sluong@cisco.com> (cherry picked from commit a1f9ee8ea6b7e22a45d7b0cbf631bea3f91864b4)
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 d333dfcc0d1..0ca7f9eab31 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;
}