diff options
author | Onong Tayeng <otayeng@cisco.com> | 2020-09-04 17:16:23 +0530 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-09-16 10:14:22 +0000 |
commit | 7bae4911bfbff80e9fa8865f6a81d1cd8755b384 (patch) | |
tree | 837bd0742c1759502dbf45fb10f18f88fd021644 /src/vnet/lisp-cp/control.c | |
parent | 911d7563cb7b6c2c6168c0d4a041dd82dcb80fb9 (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
(cherry picked from commit a3960a8b74de5cef51db2c7575f8f2d71a013d0a)
Diffstat (limited to 'src/vnet/lisp-cp/control.c')
-rw-r--r-- | src/vnet/lisp-cp/control.c | 6 |
1 files changed, 5 insertions, 1 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); } |