aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorAndrej Kozemcak <akozemca@cisco.com>2016-05-25 12:43:21 +0200
committerAndrej Kozemcak <akozemca@cisco.com>2016-05-25 13:34:53 +0200
commit94e34764b46a2babcaea6b309158524a7c1bb632 (patch)
tree3531dc9644e0fda0ea8611a32a0abceb1bb590cb /vnet
parentdf921cc65a25f6fb71b1169db6ff004b4e45430e (diff)
ONE-14: Fix crash when re-enable Lisp
Change-Id: Ib95338d7055dea9036eddb7dff5ca7ccbcb35639 Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/lisp-cp/control.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/vnet/vnet/lisp-cp/control.c b/vnet/vnet/lisp-cp/control.c
index b7c5dae9..6a9e2ed5 100644
--- a/vnet/vnet/lisp-cp/control.c
+++ b/vnet/vnet/lisp-cp/control.c
@@ -1443,7 +1443,7 @@ typedef enum
typedef struct
{
gid_address_t dst_eid;
- ip4_address_t map_resolver_ip;
+ ip_address_t map_resolver_ip;
} lisp_cp_lookup_trace_t;
u8 *
@@ -1828,10 +1828,15 @@ lisp_cp_lookup (vlib_main_t * vm, vlib_node_runtime_t * node,
{
lisp_cp_lookup_trace_t *tr = vlib_add_trace (vm, node, p0,
sizeof(*tr));
+
+ memset(tr, 0, sizeof(*tr));
gid_address_copy (&tr->dst_eid, &dst);
- clib_memcpy (&tr->map_resolver_ip,
- vec_elt_at_index(lcm->map_resolvers, 0),
- sizeof(ip_address_t));
+ if (vec_len(lcm->map_resolvers) > 0)
+ {
+ clib_memcpy (&tr->map_resolver_ip,
+ vec_elt_at_index(lcm->map_resolvers, 0),
+ sizeof(ip_address_t));
+ }
}
}