summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/interface_cli.c')
-rw-r--r--src/vnet/interface_cli.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index 73b275785b8..68431860183 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -976,8 +976,23 @@ set_unnumbered (vlib_main_t * vm,
return clib_error_return (0, "When enabling unnumbered specify the"
" IP enabled interface that it uses");
- vnet_sw_interface_update_unnumbered (unnumbered_sw_if_index,
- inherit_from_sw_if_index, enable);
+ int rv = vnet_sw_interface_update_unnumbered (
+ unnumbered_sw_if_index, inherit_from_sw_if_index, enable);
+
+ switch (rv)
+ {
+ case 0:
+ break;
+
+ case VNET_API_ERROR_UNEXPECTED_INTF_STATE:
+ return clib_error_return (
+ 0,
+ "When enabling unnumbered both interfaces must be in the same tables");
+
+ default:
+ return clib_error_return (
+ 0, "vnet_sw_interface_update_unnumbered returned %d", rv);
+ }
return (NULL);
}