aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/lisp-gpe/decap.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-10-25 16:47:52 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-10-26 14:43:25 +0000
commitf195019a300e9f0d375f74cd11ee1dd0cc64aecf (patch)
tree43e7ff9cdda218558ac000351a14f4ddaaced1cf /vnet/vnet/lisp-gpe/decap.c
parent513da53d96731002bb24285413c7646e25210ac8 (diff)
Use only 24 bits for vni in lisp-gpe data packets
Change-Id: I5a8ff12dfa8d4d9f24275590ff8293e7eb7ffbb6 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'vnet/vnet/lisp-gpe/decap.c')
-rw-r--r--vnet/vnet/lisp-gpe/decap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vnet/vnet/lisp-gpe/decap.c b/vnet/vnet/lisp-gpe/decap.c
index 9c1fb88a6f2..637d4a740c8 100644
--- a/vnet/vnet/lisp-gpe/decap.c
+++ b/vnet/vnet/lisp-gpe/decap.c
@@ -378,9 +378,10 @@ lisp_gpe_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
tl0 = next_index_to_iface (lgm, next0);
/* map iid/vni to lisp-gpe sw_if_index which is used by ipx_input to
- * decide the rx vrf and the input features to be applied */
+ * decide the rx vrf and the input features to be applied.
+ * NOTE: vni uses only the first 24 bits */
si0 = hash_get (tl0->sw_if_index_by_vni,
- clib_net_to_host_u32 (lh0->iid));
+ clib_net_to_host_u32 (lh0->iid << 8));
/* Required to make the l2 tag push / pop code work on l2 subifs */
vnet_update_l2_len (b0);