static void
interface_cleanup_state(struct interface *iface)
{
+ interface_set_available(iface, false);
+
interface_flush_state(iface);
interface_clear_errors(iface);
interface_set_proto_state(iface, NULL);
+
+ if (iface->main_dev.dev)
+ interface_set_main_dev(iface, NULL);
}
static void
interface_remove_user(dep);
interface_ip_flush(&iface->config_ip);
- if (iface->main_dev.dev)
- interface_set_main_dev(iface, NULL);
-
interface_cleanup_state(iface);
}