API support for src/dst based routing policy in LISP
[vpp.git] / vnet / vnet / interface.c
index d36f781..24f9cbc 100644 (file)
@@ -354,7 +354,9 @@ vnet_sw_interface_set_flags_helper (vnet_main_t * vnm, u32 sw_if_index, u32 flag
        {
          si_sup = vnet_get_sw_interface (vnm, si->sup_sw_if_index);
 
-         if (flags != (si_sup->flags & mask))
+         /* Check to see if we're bringing down the soft interface and if it's parent is up */
+         if ((flags != (si_sup->flags & mask)) && 
+                 (!((flags == 0) && ((si_sup->flags & mask) == VNET_SW_INTERFACE_FLAG_ADMIN_UP))))
            {
              error = clib_error_return (0, "super-interface %U must be %U",
                                         format_vnet_sw_interface_name, vnm, si_sup,
@@ -656,7 +658,16 @@ vnet_register_interface (vnet_main_t * vnm,
       rt = vlib_node_get_runtime_data (vm, hw->output_node_index);
       ASSERT (rt->is_deleted == 1);
       rt->is_deleted = 0;
+      rt->hw_if_index = hw_index; 
+      rt->sw_if_index = hw->sw_if_index;
+      rt->dev_instance = hw->dev_instance;
 
+      rt = vlib_node_get_runtime_data (vm, hw->tx_node_index);
+      rt->hw_if_index = hw_index;
+      rt->sw_if_index = hw->sw_if_index;
+      rt->dev_instance = hw->dev_instance;
+
+      vlib_worker_thread_node_runtime_update();
       _vec_len (im->deleted_hw_interface_nodes) -= 1;
     }
   else
@@ -689,8 +700,8 @@ vnet_register_interface (vnet_main_t * vnm,
       r.flags = 0;
       r.name = output_node_name;
       r.function =  dev_class->no_flatten_output_chains ?
-          vnet_interface_output_node_no_flatten : 
-          vnet_interface_output_node;
+          vnet_interface_output_node_no_flatten_multiarch_select() :
+          vnet_interface_output_node_multiarch_select() ;
       r.format_trace = format_vnet_interface_output_trace;
 
       {