ARP learning fixes (VPP-843)
[vpp.git] / src / vnet / interface.c
index 2a1e70e..41e2186 100644 (file)
@@ -482,6 +482,13 @@ vnet_sw_interface_set_flags_helper (vnet_main_t * vnm, u32 sw_if_index,
          vnet_device_class_t *dev_class =
            vnet_get_device_class (vnm, hi->dev_class_index);
 
+         if ((flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) &&
+             (si->flags & VNET_SW_INTERFACE_FLAG_ERROR))
+           {
+             error = clib_error_return (0, "Interface in the error state");
+             goto done;
+           }
+
          /* save the si admin up flag */
          old_flags = si->flags;
 
@@ -919,6 +926,8 @@ vnet_delete_hw_interface (vnet_main_t * vnm, u32 hw_if_index)
 
   hash_unset_mem (im->hw_interface_by_name, hw->name);
   vec_free (hw->name);
+  vec_free (hw->input_node_thread_index_by_queue);
+  vec_free (hw->dq_runtime_index_by_queue);
 
   pool_put (im->hw_interfaces, hw);
 }
@@ -1360,7 +1369,7 @@ vnet_link_to_l3_proto (vnet_link_t link)
     case VNET_LINK_IP6:
       return (VNET_L3_PACKET_TYPE_IP6);
     case VNET_LINK_MPLS:
-      return (VNET_L3_PACKET_TYPE_MPLS_UNICAST);
+      return (VNET_L3_PACKET_TYPE_MPLS);
     case VNET_LINK_ARP:
       return (VNET_L3_PACKET_TYPE_ARP);
     case VNET_LINK_ETHERNET: