From bcebbb988da4fcbb6158c05050f96ae87cc50156 Mon Sep 17 00:00:00 2001 From: John Lo Date: Tue, 5 Apr 2016 15:47:43 -0400 Subject: 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 --- vpp/api/api.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vpp/api/api.c') diff --git a/vpp/api/api.c b/vpp/api/api.c index 9867b596..aaa4be58 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); -- cgit 1.2.3-korg