aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gbp/vxlan_gbp.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-29 05:08:27 -0700
committerNeale Ranns <nranns@cisco.com>2019-04-03 13:48:19 +0000
commit2b600184f3f43e740b54a1c51d3a35f8c1a77868 (patch)
treece2384579f02214589729ee90642aec035906f47 /src/vnet/vxlan-gbp/vxlan_gbp.h
parent7cae003a68ed3e1022bcc8d33d0b5375918a83f7 (diff)
GBP: iVXLAN reflection check
packets should not egress on an iVXLAN tunnel if they arrived on one. Change-Id: I9adca30252364b4878f99e254aebc73b70a5d4d6 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/vxlan-gbp/vxlan_gbp.h')
-rw-r--r--src/vnet/vxlan-gbp/vxlan_gbp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp.h b/src/vnet/vxlan-gbp/vxlan_gbp.h
index 6580f38e119..af2e1809099 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp.h
+++ b/src/vnet/vxlan-gbp/vxlan_gbp.h
@@ -226,6 +226,17 @@ int vnet_vxlan_gbp_tunnel_del (u32 sw_if_indexp);
void vnet_int_vxlan_gbp_bypass_mode (u32 sw_if_index, u8 is_ip6,
u8 is_enable);
+always_inline u32
+vxlan_gbp_tunnel_by_sw_if_index (u32 sw_if_index)
+{
+ vxlan_gbp_main_t *vxm = &vxlan_gbp_main;
+
+ if (sw_if_index >= vec_len (vxm->tunnel_index_by_sw_if_index))
+ return ~0;
+
+ return (vxm->tunnel_index_by_sw_if_index[sw_if_index]);
+}
+
#endif /* included_vnet_vxlan_gbp_h */
/*