aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/lisp-gpe/decap.c5
-rw-r--r--vnet/vnet/lisp-gpe/lisp_gpe_tunnel.c2
2 files changed, 4 insertions, 3 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);
diff --git a/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.c b/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.c
index 4d5587b7d3e..e4e59707e8f 100644
--- a/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.c
+++ b/vnet/vnet/lisp-gpe/lisp_gpe_tunnel.c
@@ -114,7 +114,7 @@ lisp_gpe_tunnel_build_rewrite (const lisp_gpe_tunnel_t * lgt,
lisp0->ver_res = 0;
lisp0->res = 0;
lisp0->next_protocol = payload_proto;
- lisp0->iid = clib_host_to_net_u32 (ladj->vni);
+ lisp0->iid = clib_host_to_net_u32 (ladj->vni) >> 8; /* first 24 bits only */
return (rw);
}