diff options
author | Neale Ranns <nranns@cisco.com> | 2018-11-07 04:21:12 -0800 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-11-07 13:28:11 +0000 |
commit | c29c0af40eda76e382a63269bca9ff57c6ecf5d5 (patch) | |
tree | 3be3f4a3ff2047bcfe553719a0d87ae048ec1f11 /src/plugins/gbp/gbp_api.c | |
parent | 7ac053b27fee8f9e437cf7b61357943356381061 (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_api.c')
-rw-r--r-- | src/plugins/gbp/gbp_api.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/gbp/gbp_api.c b/src/plugins/gbp/gbp_api.c index faf036e9d81..47823d5cd9b 100644 --- a/src/plugins/gbp/gbp_api.c +++ b/src/plugins/gbp/gbp_api.c @@ -299,6 +299,20 @@ static void REPLY_MACRO (VL_API_GBP_ENDPOINT_GROUP_DEL_REPLY + GBP_MSG_BASE); } +static gbp_bridge_domain_flags_t +gbp_bridge_domain_flags_from_api (vl_api_gbp_bridge_domain_flags_t a) +{ + gbp_bridge_domain_flags_t g; + + g = GBP_BD_FLAG_NONE; + a = clib_net_to_host_u32 (a); + + if (a & GBP_BD_API_FLAG_DO_NOT_LEARN) + g |= GBP_BD_FLAG_DO_NOT_LEARN; + + return (g); +} + static void vl_api_gbp_bridge_domain_add_t_handler (vl_api_gbp_bridge_domain_add_t * mp) { @@ -306,6 +320,8 @@ vl_api_gbp_bridge_domain_add_t_handler (vl_api_gbp_bridge_domain_add_t * mp) int rv = 0; rv = gbp_bridge_domain_add_and_lock (ntohl (mp->bd.bd_id), + gbp_bridge_domain_flags_from_api + (mp->bd.flags), ntohl (mp->bd.bvi_sw_if_index), ntohl (mp->bd.uu_fwd_sw_if_index)); |