aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorChris Luke <chrisy@flirble.org>2016-05-06 17:09:09 -0400
committerChris Luke <chrisy@flirble.org>2016-05-06 17:09:09 -0400
commit393490e0f5b9791105616bde88024586ba5c0cc5 (patch)
treeb2d5ee6eeb130c6fe46fbfc4bc444839c64336b3 /vnet
parent7ae717de72771a4412af2a0ea72c69b87961b8e9 (diff)
VPP-34 GRE traffic blackholes in encap direction
The GRE code is missing the logic to indicate the "hardware" interface is up. The fix is to listen for admin up/down events on the "software" interface and reflect that into the hardware interface state. Change-Id: If06e4f03989b2c52c32f50c11e1943e42bb2609f Signed-off-by: Chris Luke <chrisy@flirble.org>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/gre/gre.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/vnet/vnet/gre/gre.c b/vnet/vnet/gre/gre.c
index aad7645b5db..075bd6fd46e 100644
--- a/vnet/vnet/gre/gre.c
+++ b/vnet/vnet/gre/gre.c
@@ -416,6 +416,17 @@ gre_interface_tx (vlib_main_t * vm,
return frame->n_vectors;
}
+static clib_error_t *
+gre_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
+{
+ if (flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP)
+ vnet_hw_interface_set_flags (vnm, hw_if_index, VNET_HW_INTERFACE_FLAG_LINK_UP);
+ else
+ vnet_hw_interface_set_flags (vnm, hw_if_index, 0 /* down */);
+
+ return /* no error */ 0;
+}
+
static u8 * format_gre_tunnel_name (u8 * s, va_list * args)
{
u32 dev_instance = va_arg (*args, u32);
@@ -437,9 +448,9 @@ VNET_DEVICE_CLASS (gre_device_class) = {
.format_device = format_gre_device,
.format_tx_trace = format_gre_tx_trace,
.tx_function = gre_interface_tx,
+ .admin_up_down_function = gre_interface_admin_up_down,
#ifdef SOON
.clear counter = 0;
- .admin_up_down_function = 0;
#endif
};