From b4874ee8d5a92017cb91ad23b0783385dd58253c Mon Sep 17 00:00:00 2001 From: Filip Tehlar Date: Wed, 29 Mar 2017 09:39:23 +0200 Subject: [PATCH] LISP: fix IID in decap Change-Id: I3f67d32d5d76069a27176deef6cba0c1a194b7ec Signed-off-by: Filip Tehlar --- src/vnet/lisp-gpe/decap.c | 4 ++-- src/vnet/lisp-gpe/interface.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vnet/lisp-gpe/decap.c b/src/vnet/lisp-gpe/decap.c index 50bfa4938db..d887a95f16c 100644 --- a/src/vnet/lisp-gpe/decap.c +++ b/src/vnet/lisp-gpe/decap.c @@ -256,9 +256,9 @@ lisp_gpe_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node, /* 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 */ si0 = hash_get (tl0->sw_if_index_by_vni, - clib_net_to_host_u32 (lh0->iid)); + clib_net_to_host_u32 (lh0->iid << 8)); si1 = hash_get (tl1->sw_if_index_by_vni, - clib_net_to_host_u32 (lh1->iid)); + clib_net_to_host_u32 (lh1->iid << 8)); /* Required to make the l2 tag push / pop code work on l2 subifs */ diff --git a/src/vnet/lisp-gpe/interface.c b/src/vnet/lisp-gpe/interface.c index cbd4d4cd87b..4760f44833a 100644 --- a/src/vnet/lisp-gpe/interface.c +++ b/src/vnet/lisp-gpe/interface.c @@ -185,7 +185,8 @@ format_lisp_gpe_header_with_length (u8 * s, va_list * args) s = format (s, "\n ver_res %d res %d next_protocol %d iid %d(%x)", h->ver_res, h->res, h->next_protocol, - clib_net_to_host_u32 (h->iid), clib_net_to_host_u32 (h->iid)); + clib_net_to_host_u32 (h->iid << 8), + clib_net_to_host_u32 (h->iid << 8)); return s; } -- 2.16.6