*mgmt_oid = NULL;
}
- error =
- vnet_hw_interface_add_del_mac_address (lm->vnet_main, hw_if_index,
- lldp_mac_addr,
- 1 /* is_add */ );
- if (error)
+ /* Add MAC address to an interface's filter */
+ if (hi->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_MAC_FILTER)
{
- clib_error_free (error);
- lldp_delete_intf (lm, n);
- return lldp_internal_error;
+ error =
+ vnet_hw_interface_add_del_mac_address (lm->vnet_main,
+ hw_if_index,
+ lldp_mac_addr,
+ 1 /* is_add */ );
+ if (error)
+ {
+ clib_error_free (error);
+ lldp_delete_intf (lm, n);
+ return lldp_internal_error;
+ }
}
const vnet_sw_interface_t *sw =
{
lldp_intf_t *n = lldp_get_intf (lm, hi->sw_if_index);
lldp_delete_intf (lm, n);
- if (n)
+ /* Remove MAC address from the interface's filter */
+ if ((n) && (hi->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_MAC_FILTER))
{
error =
- vnet_hw_interface_add_del_mac_address (lm->vnet_main, hw_if_index,
+ vnet_hw_interface_add_del_mac_address (lm->vnet_main,
+ hw_if_index,
lldp_mac_addr,
0 /* is_add */ );
if (error)