diff options
author | 2016-10-12 13:51:05 +0100 | |
---|---|---|
committer | 2016-10-12 17:51:06 +0000 | |
commit | 5899fdedad93eec01088dca980e9f5fd70aae9c4 (patch) | |
tree | 1e557d6c66c5c80b9f62a6141d095a78969e8330 /vnet/vnet/mpls | |
parent | 69a9b76d648a108e0a7fad4404b218ebdd6a8ea5 (diff) |
Coverity warnings in new FIB code (VPP-484)
Change-Id: Ie221e246dd8c6a1b3c76e7aa85924762d4397782
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vnet/vnet/mpls')
-rw-r--r-- | vnet/vnet/mpls/mpls.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vnet/vnet/mpls/mpls.c b/vnet/vnet/mpls/mpls.c index be5e882f1b3..de57da880f2 100644 --- a/vnet/vnet/mpls/mpls.c +++ b/vnet/vnet/mpls/mpls.c @@ -744,6 +744,8 @@ vnet_mpls_local_label (vlib_main_t * vm, is_ip = 0; table_id = 0; eos = MPLS_EOS; + is_del = 0; + local_label = MPLS_LABEL_INVALID; /* Get a line of input. */ if (! unformat_user (input, unformat_line_input, line_input)) @@ -818,6 +820,14 @@ vnet_mpls_local_label (vlib_main_t * vm, } + if (MPLS_LABEL_INVALID == local_label) + { + error = clib_error_return (0, "local-label required: %U", + format_unformat_error, input); + goto done; + } + + if (is_ip) { u32 fib_index = fib_table_find(pfx.fp_proto, table_id); |