diff options
Diffstat (limited to 'vnet/vnet/mpls/mpls.c')
-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); |