aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-11-22 02:49:13 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-22 12:30:29 +0000
commit3ce7bcb55b8bdf53aa4975a6312a5fd4a1ca2d0c (patch)
tree2bbc953baa20b65f5570ed86ab38ac7f7f286d05
parent6cfe643106e903b5b301a2ca748de8b58721c8c8 (diff)
CLI for interface MPLS enable returns errors to caller
Change-Id: I9eef6fb9d050552f0759080ea645b885d5b9cc12 Signed-off-by: Neale Ranns <nranns@cisco.com>
-rw-r--r--src/vnet/mpls/interface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/mpls/interface.c b/src/vnet/mpls/interface.c
index d7c8e7d340e..c792d56b12e 100644
--- a/src/vnet/mpls/interface.c
+++ b/src/vnet/mpls/interface.c
@@ -90,6 +90,7 @@ mpls_interface_enable_disable (vlib_main_t * vm,
vnet_main_t * vnm = vnet_get_main();
clib_error_t * error = 0;
u32 sw_if_index, enable;
+ int rv;
sw_if_index = ~0;
@@ -111,7 +112,10 @@ mpls_interface_enable_disable (vlib_main_t * vm,
goto done;
}
- mpls_sw_interface_enable_disable(&mpls_main, sw_if_index, enable, 0);
+ rv = mpls_sw_interface_enable_disable(&mpls_main, sw_if_index, enable, 0);
+
+ if (VNET_API_ERROR_NO_SUCH_FIB == rv)
+ error = clib_error_return (0, "default MPLS table must be created first");
done:
return error;