lldp_main_t *lm = &lldp_main;
vnet_main_t *vnm = lm->vnet_main;
ethernet_main_t *em = ðernet_main;
- const vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, hw_if_index);
- const ethernet_interface_t *eif = ethernet_get_interface (em, hw_if_index);
+ const vnet_hw_interface_t *hi;
+ const ethernet_interface_t *eif;
+ if (pool_is_free_index (vnm->interface_main.hw_interfaces, hw_if_index))
+ {
+ return lldp_invalid_arg;
+ }
+
+ hi = vnet_get_hw_interface (vnm, hw_if_index);
+ eif = ethernet_get_interface (em, hw_if_index);
if (!eif)
{
return lldp_not_supported;
if (mgmt_oid && *mgmt_oid)
{
n->mgmt_oid = *mgmt_oid;
- *mgmt_ip6 = NULL;
+ *mgmt_oid = NULL;
}
const vnet_sw_interface_t *sw =