diff options
author | Dave Barach <dave@barachs.net> | 2016-07-01 12:38:11 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2016-07-01 12:38:29 -0400 |
commit | b8dca74c232d6f177479d644dc3359b82772ea9e (patch) | |
tree | 85c1260131b9fb0c4987918bd78c75f4a0791b2c /vnet/vnet/ip/ip46_cli.c | |
parent | bfd32fddb32a0927f85081c4a2364f5b3da5cfa5 (diff) |
VPP-171: fix a set of hw interface recycling bugs
Change-Id: I735292bb2176742acab2295f90956c57e6f7ec1c
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vnet/vnet/ip/ip46_cli.c')
-rw-r--r-- | vnet/vnet/ip/ip46_cli.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vnet/vnet/ip/ip46_cli.c b/vnet/vnet/ip/ip46_cli.c index 44dde9bf3e7..3bb7d766d70 100644 --- a/vnet/vnet/ip/ip46_cli.c +++ b/vnet/vnet/ip/ip46_cli.c @@ -102,6 +102,23 @@ void ip_del_all_interface_addresses (vlib_main_t *vm, u32 sw_if_index) } static clib_error_t * +ip_address_delete_cleanup (vnet_main_t * vnm, u32 hw_if_index, u32 is_create) +{ + vlib_main_t * vm = vlib_get_main(); + vnet_hw_interface_t * hw; + + if (is_create) + return 0; + + hw = vnet_get_hw_interface (vnm, hw_if_index); + + ip_del_all_interface_addresses (vm, hw->sw_if_index); + return 0; +} + +VNET_HW_INTERFACE_ADD_DEL_FUNCTION (ip_address_delete_cleanup); + +static clib_error_t * add_del_ip_address (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) |