diff options
Diffstat (limited to 'vnet/vnet/ip/ip4_forward.c')
-rw-r--r-- | vnet/vnet/ip/ip4_forward.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c index 6b7fa9b4d05..767cc8f8ce8 100644 --- a/vnet/vnet/ip/ip4_forward.c +++ b/vnet/vnet/ip/ip4_forward.c @@ -193,7 +193,12 @@ ip4_fib_set_adj_index (ip4_main_t * im, fib->new_hash_values); p = hash_get (hash, dst_address_u32); - clib_memcpy (p, fib->new_hash_values, vec_bytes (fib->new_hash_values)); + /* hash_get should never return NULL here */ + if (p) + clib_memcpy (p, fib->new_hash_values, + vec_bytes (fib->new_hash_values)); + else + ASSERT(0); } } |