Skip to content

Commit a3960a8

Browse files
onongflorincoras
authored andcommitted
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
1 parent 5d2091d commit a3960a8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/vnet/lisp-cp/control.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3552,7 +3552,11 @@ lisp_cp_lookup_inline (vlib_main_t * vm,
35523552
sizeof (*tr));
35533553

35543554
clib_memset (tr, 0, sizeof (*tr));
3555-
gid_address_copy (&tr->dst_eid, &dst);
3555+
if ((gid_address_type (&dst) == GID_ADDR_NDP) ||
3556+
(gid_address_type (&dst) == GID_ADDR_ARP))
3557+
clib_memcpy (&tr->dst_eid, &dst, sizeof (gid_address_t));
3558+
else
3559+
gid_address_copy (&tr->dst_eid, &dst);
35563560
ip_address_copy (&tr->map_resolver_ip,
35573561
&lcm->active_map_resolver);
35583562
}

src/vnet/lisp-cp/lisp_types.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ serdes_fct write_fcts[GID_ADDR_TYPES] =
4141
};
4242

4343
cast_fct cast_fcts[GID_ADDR_TYPES] =
44-
{ ip_prefix_cast, lcaf_cast, mac_cast, sd_cast, nsh_cast, 0 /* arp */ ,
44+
{ ip_prefix_cast, lcaf_cast, mac_cast, sd_cast, nsh_cast, no_addr_cast,
4545
no_addr_cast
4646
};
4747

@@ -51,7 +51,7 @@ addr_len_fct addr_len_fcts[GID_ADDR_TYPES] =
5151
};
5252

5353
copy_fct copy_fcts[GID_ADDR_TYPES] =
54-
{ ip_prefix_copy, lcaf_copy, mac_copy, sd_copy, nsh_copy, 0 /* arp */ ,
54+
{ ip_prefix_copy, lcaf_copy, mac_copy, sd_copy, nsh_copy, no_addr_copy,
5555
no_addr_copy
5656
};
5757

0 commit comments

Comments
 (0)