vui->region_addr[i]= -1;
if (r == -1) {
- clib_warning("failed to unmap memory region (errno %d)", errno);
+ clib_unix_warning("failed to unmap memory region");
}
close(vui->region_fd[i]);
}
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
vec_free (ip6_masks);
}
+static clib_error_t *
+ip_address_delete_cleanup (vnet_main_t * vnm, u32 hw_if_index, u32 is_create)
+{
+ vlib_main_t * vm = vlib_get_main();
+ vnet_hw_interface_t * hw;
+
+ if (is_create)
+ return 0;
+
+ hw = vnet_get_hw_interface (vnm, hw_if_index);
+
+ ip_del_all_interface_addresses (vm, hw->sw_if_index);
+ return 0;
+}
+
+VNET_HW_INTERFACE_ADD_DEL_FUNCTION (ip_address_delete_cleanup);
+
static clib_error_t *
add_del_ip_address (vlib_main_t * vm,
unformat_input_t * input,