diff options
author | Calvin <calvin.ference@gmail.com> | 2016-07-04 14:14:46 -0400 |
---|---|---|
committer | Chris Luke <chris_luke@comcast.com> | 2016-07-06 16:47:35 +0000 |
commit | 31a367417e1ac5e60d1d39001293a12e332e492f (patch) | |
tree | 2a83f56d8b5e70ab28c64d02683c7fff75051206 /vnet | |
parent | cbec1a18e2538b0dd808f22b6b53a71e8bf285fd (diff) |
Bug fix for VPP-104 about not being able to down a sub-if if the super-if is up
Change-Id: I913c9807519aa10e515d12fcfbcbfc22b58f5839
Signed-off-by: Calvin <calvin.ference@gmail.com>
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vnet/vnet/interface.c b/vnet/vnet/interface.c index d84c8b03bc2..24f9cbc9aff 100644 --- a/vnet/vnet/interface.c +++ b/vnet/vnet/interface.c @@ -354,7 +354,9 @@ vnet_sw_interface_set_flags_helper (vnet_main_t * vnm, u32 sw_if_index, u32 flag { si_sup = vnet_get_sw_interface (vnm, si->sup_sw_if_index); - if (flags != (si_sup->flags & mask)) + /* Check to see if we're bringing down the soft interface and if it's parent is up */ + if ((flags != (si_sup->flags & mask)) && + (!((flags == 0) && ((si_sup->flags & mask) == VNET_SW_INTERFACE_FLAG_ADMIN_UP)))) { error = clib_error_return (0, "super-interface %U must be %U", format_vnet_sw_interface_name, vnm, si_sup, |