summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorOnong Tayeng <otayeng@cisco.com>2020-09-04 17:16:23 +0530
committerFlorin Coras <florin.coras@gmail.com>2020-09-10 15:06:27 +0000
commita3960a8b74de5cef51db2c7575f8f2d71a013d0a (patch)
treed1fe36baa0a9e7ea32d0632cfa5a64950c3a604a /src/vnet
parent5d2091da2a96cb1092b0744cdee8bb481788a6dc (diff)
lisp: fix crash with arp and packet trace on
With packet trace on, VPP crashes when an arp packet arrives. This patch fixes the crash and also ensures that the packet trace displays the eid info. Type: fix Signed-off-by: Onong Tayeng <otayeng@cisco.com> Change-Id: Iaad09a5e2b33e931ab9bd7bc3d4573b5ed5e4bfd
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/lisp-cp/control.c6
-rw-r--r--src/vnet/lisp-cp/lisp_types.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c
index 7e9d059f9ed..60d85619dc5 100644
--- a/src/vnet/lisp-cp/control.c
+++ b/src/vnet/lisp-cp/control.c
@@ -3552,7 +3552,11 @@ lisp_cp_lookup_inline (vlib_main_t * vm,
sizeof (*tr));
clib_memset (tr, 0, sizeof (*tr));
- gid_address_copy (&tr->dst_eid, &dst);
+ if ((gid_address_type (&dst) == GID_ADDR_NDP) ||
+ (gid_address_type (&dst) == GID_ADDR_ARP))
+ clib_memcpy (&tr->dst_eid, &dst, sizeof (gid_address_t));
+ else
+ gid_address_copy (&tr->dst_eid, &dst);
ip_address_copy (&tr->map_resolver_ip,
&lcm->active_map_resolver);
}
diff --git a/src/vnet/lisp-cp/lisp_types.c b/src/vnet/lisp-cp/lisp_types.c
index 971d3071b6a..6ff3b4ebf4b 100644
--- a/src/vnet/lisp-cp/lisp_types.c
+++ b/src/vnet/lisp-cp/lisp_types.c
@@ -41,7 +41,7 @@ serdes_fct write_fcts[GID_ADDR_TYPES] =
};
cast_fct cast_fcts[GID_ADDR_TYPES] =
- { ip_prefix_cast, lcaf_cast, mac_cast, sd_cast, nsh_cast, 0 /* arp */ ,
+ { ip_prefix_cast, lcaf_cast, mac_cast, sd_cast, nsh_cast, no_addr_cast,
no_addr_cast
};
@@ -51,7 +51,7 @@ addr_len_fct addr_len_fcts[GID_ADDR_TYPES] =
};
copy_fct copy_fcts[GID_ADDR_TYPES] =
- { ip_prefix_copy, lcaf_copy, mac_copy, sd_copy, nsh_copy, 0 /* arp */ ,
+ { ip_prefix_copy, lcaf_copy, mac_copy, sd_copy, nsh_copy, no_addr_copy,
no_addr_copy
};