Interface Tag: memset field in VOM, clear the tag in VPP on interface delete

Change-Id: Id97de732b5952d5d86202e7749c9e81cf8dbed87
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
This commit is contained in:
Neale Ranns
2018-05-31 21:23:37 -07:00
committed by Neale Ranns
parent ba614d63a8
commit e8d7ff5f87
2 changed files with 2 additions and 0 deletions

View File

@ -723,6 +723,7 @@ set_tag::issue(connection& con)
auto& payload = req.get_request().get_payload();
payload.is_add = 1;
payload.sw_if_index = m_hw_item.data().value();
memset(payload.tag, 0, sizeof(payload.tag));
memcpy(payload.tag, m_name.c_str(), m_name.length());
VAPI_CALL(req.execute());

View File

@ -670,6 +670,7 @@ vnet_delete_sw_interface (vnet_main_t * vnm, u32 sw_if_index)
if (config->xconnect || config->bridge)
set_int_l2_mode (vm, vnm, MODE_L3, sw_if_index, 0, 0, 0, 0);
}
vnet_clear_sw_interface_tag (vnm, sw_if_index);
/* Bring down interface in case it is up. */
if (sw->flags != 0)