aboutsummaryrefslogtreecommitdiffstats
path: root/vpp
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-04-05 15:47:43 -0400
committerGerrit Code Review <gerrit@fd.io>2016-04-07 14:33:05 +0000
commitbcebbb988da4fcbb6158c05050f96ae87cc50156 (patch)
tree9542744dbc6315e15b41e361369bb8da983207c5 /vpp
parent2fa6beff5726ecb7c863d0027395ed63dc4831ca (diff)
Enhance CLI/API Support for Bonded Interface
For interfaces which are slave links to a bounded interface, do not allow sub-interface creation nor interface state to be changed. Change "show interface" to display interface state as "bond-slave" for slave links to a bonded interface. Change "show hardware" to support a "bond" keyword and display slave links to a bonded interface. Change-Id: I4db3cae6985bcb1489ab16a07c72c5ee9b2f2dd3 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'vpp')
-rw-r--r--vpp/api/api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c
index 9867b596216..aaa4be58f55 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -1859,6 +1859,11 @@ vl_api_create_subif_t_handler (vl_api_create_subif_t * mp)
si = vnet_get_sup_sw_interface (vnm, ntohl(mp->sw_if_index));
hi = vnet_get_sup_hw_interface (vnm, ntohl(mp->sw_if_index));
+ if (hi->bond_info == VNET_HW_INTERFACE_BOND_INFO_SLAVE) {
+ rv = VNET_API_ERROR_BOND_SLAVE_NOT_ALLOWED;
+ goto out;
+ }
+
sw_if_index = si->sw_if_index;
sub_id = ntohl(mp->sub_id);