static void
mark_interface_down(struct interface *iface)
{
+ interface_clear_dns(iface);
vlist_flush_all(&iface->proto_addr);
vlist_flush_all(&iface->proto_route);
if (iface->main_dev.dev)
}
return 0;
-
}
static void
if (iface->state != IFS_SETUP)
return;
+ system_flush_routes();
iface->state = IFS_UP;
iface->start_time = system_get_rtime();
interface_event(iface, IFEV_UP);
if (iface->state == IFS_DOWN)
return;
+ system_flush_routes();
mark_interface_down(iface);
interface_handle_config_change(iface);
if (iface->autostart)
{
iface->autostart = true;
+ if (iface->state != IFS_DOWN)
+ return 0;
+
+ interface_clear_errors(iface);
if (!iface->available) {
interface_add_error(iface, "interface", "NO_DEVICE", NULL, 0);
return -1;
}
- if (iface->state != IFS_DOWN)
- return 0;
-
return __interface_set_up(iface);
}