IPIP: Fix coverity error. 08/11208/2
authorOle Troan <ot@cisco.com>
Mon, 19 Mar 2018 11:14:02 +0000 (12:14 +0100)
committerNeale Ranns <nranns@cisco.com>
Mon, 19 Mar 2018 15:36:38 +0000 (15:36 +0000)
Change-Id: Ia2b3350bf8e2c72eee3f33936ba16dd817c75c72
Signed-off-by: Ole Troan <ot@cisco.com>
src/vnet/ipip/sixrd.c

index c44c834..282f468 100644 (file)
@@ -195,6 +195,9 @@ sixrd_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai)
   ip_adjacency_t *adj = adj_get (ai);
   ipip_tunnel_t *t = ipip_tunnel_db_find_by_sw_if_index (sw_if_index);
 
+  /* Not our tunnel */
+  if (!t)
+    return;
   if (!memcmp (&sixrd_special_nh, &adj->sub_type.nbr.next_hop,
               sizeof (sixrd_special_nh)))
     {