summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_input.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2019-10-08 08:57:45 +0000
committerDamjan Marion <dmarion@me.com>2019-10-09 10:31:51 +0000
commit2429f8bdac28cae419d8d95ee4f039554f95d9a5 (patch)
treec8f592e24c9b7f88889f222ababc600f4032ae6a /src/vnet/ip/ip6_input.c
parent2777ec761514fc0838ad11e6232ad97897663356 (diff)
ip: fix coverity warning
Type: fix Fixes: 0eb75d0e9c7624a4e8ac69fea7dbe12d39b75096 Change-Id: I8bcdc06b33bf4e12752b90dc3445fa51af552a46 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip6_input.c')
-rw-r--r--src/vnet/ip/ip6_input.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/ip/ip6_input.c b/src/vnet/ip/ip6_input.c
index 6fab5822da2..943f6597a90 100644
--- a/src/vnet/ip/ip6_input.c
+++ b/src/vnet/ip/ip6_input.c
@@ -287,9 +287,13 @@ ip6_init (vlib_main_t * vm)
uword *u = hash_get (ip_main.protocol_info_by_name, "IPV6_FRAGMENTATION");
- ip_protocol_info_t *info = vec_elt_at_index (ip_main.protocol_infos, *u);
- ASSERT (NULL == info->format_header);
- info->format_header = format_ipv6_fragmentation;
+ if (u)
+ {
+ ip_protocol_info_t *info =
+ vec_elt_at_index (ip_main.protocol_infos, *u);
+ ASSERT (NULL == info->format_header);
+ info->format_header = format_ipv6_fragmentation;
+ }
return /* no error */ 0;
}