summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gbp/decap.c
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/decap.c
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/decap.c')
-rw-r--r--src/vnet/vxlan-gbp/decap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vnet/vxlan-gbp/decap.c b/src/vnet/vxlan-gbp/decap.c
index c520e25dcf2..23995c49fcb 100644
--- a/src/vnet/vxlan-gbp/decap.c
+++ b/src/vnet/vxlan-gbp/decap.c
@@ -330,7 +330,8 @@ vxlan_gbp_input (vlib_main_t * vm,
pkts_decapsulated++;
}
- vnet_buffer2 (b0)->gbp.flags = vxlan_gbp_get_gpflags (vxlan_gbp0);
+ vnet_buffer2 (b0)->gbp.flags = (vxlan_gbp_get_gpflags (vxlan_gbp0) |
+ VXLAN_GBP_GPFLAGS_R);
vnet_buffer2 (b0)->gbp.sclass = vxlan_gbp_get_sclass (vxlan_gbp0);
@@ -370,7 +371,9 @@ vxlan_gbp_input (vlib_main_t * vm,
(rx_counter, thread_index, t1->sw_if_index, 1, len1);
}
- vnet_buffer2 (b1)->gbp.flags = vxlan_gbp_get_gpflags (vxlan_gbp1);
+ vnet_buffer2 (b1)->gbp.flags = (vxlan_gbp_get_gpflags (vxlan_gbp1) |
+ VXLAN_GBP_GPFLAGS_R);
+
vnet_buffer2 (b1)->gbp.sclass = vxlan_gbp_get_sclass (vxlan_gbp1);
vnet_update_l2_len (b0);
@@ -476,7 +479,9 @@ vxlan_gbp_input (vlib_main_t * vm,
vlib_increment_combined_counter
(rx_counter, thread_index, t0->sw_if_index, 1, len0);
}
- vnet_buffer2 (b0)->gbp.flags = vxlan_gbp_get_gpflags (vxlan_gbp0);
+ vnet_buffer2 (b0)->gbp.flags = (vxlan_gbp_get_gpflags (vxlan_gbp0) |
+ VXLAN_GBP_GPFLAGS_R);
+
vnet_buffer2 (b0)->gbp.sclass = vxlan_gbp_get_sclass (vxlan_gbp0);
/* Required to make the l2 tag push / pop code work on l2 subifs */