aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_learn.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-11-07 04:21:12 -0800
committerNeale Ranns <nranns@cisco.com>2018-11-07 13:28:11 +0000
commitc29c0af40eda76e382a63269bca9ff57c6ecf5d5 (patch)
tree3be3f4a3ff2047bcfe553719a0d87ae048ec1f11 /src/plugins/gbp/gbp_learn.c
parent7ac053b27fee8f9e437cf7b61357943356381061 (diff)
GBP: Endpoints with VLAN tags and birdges that don't learn
Change-Id: I20192f3a8f4f01f47e775746f6fde7c685f185ee Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_learn.c')
-rw-r--r--src/plugins/gbp/gbp_learn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/gbp/gbp_learn.c b/src/plugins/gbp/gbp_learn.c
index 9239779dd99..883f3d1c862 100644
--- a/src/plugins/gbp/gbp_learn.c
+++ b/src/plugins/gbp/gbp_learn.c
@@ -236,6 +236,7 @@ gbp_learn_l2 (vlib_main_t * vm,
ip4_address_t outer_src, outer_dst;
u32 bi0, sw_if_index0, t0, epg0;
const ethernet_header_t *eh0;
+ gbp_bridge_domain_t *gb0;
gbp_learn_next_t next0;
gbp_endpoint_t *ge0;
vlib_buffer_t *b0;
@@ -259,10 +260,12 @@ gbp_learn_l2 (vlib_main_t * vm,
ge0 = gbp_endpoint_find_mac (eh0->src_address,
vnet_buffer (b0)->l2.bd_index);
+ gb0 =
+ gbp_bridge_domain_get_by_bd_index (vnet_buffer (b0)->l2.bd_index);
- if (vnet_buffer2 (b0)->gbp.flags & VXLAN_GBP_GPFLAGS_D)
+ if ((vnet_buffer2 (b0)->gbp.flags & VXLAN_GBP_GPFLAGS_D) ||
+ (gb0->gb_flags & GBP_BD_FLAG_DO_NOT_LEARN))
{
- ge0 = NULL;
t0 = 1;
goto trace;
}