interface_ip_flush(&iface->proto_ip);
if (iface->main_dev.dev)
device_release(&iface->main_dev);
+ if (iface->l3_dev != &iface->main_dev && iface->l3_dev->dev)
+ device_release(iface->l3_dev);
}
static void
interface_claim_device(iface);
proto_init_interface(iface, iface->config);
-
- if (iface->autostart && !config_init)
- interface_set_up(iface);
}
static void
break;
case IFC_REMOVE:
interface_do_free(iface);
- break;
+ return;
}
+ if (iface->autostart && iface->available)
+ interface_set_up(iface);
}
static void
system_flush_routes();
mark_interface_down(iface);
interface_handle_config_change(iface);
- if (iface->l3_dev->dev)
- device_release(iface->l3_dev);
- if (iface->autostart && iface->available)
- __interface_set_up(iface);
break;
case IFPEV_LINK_LOST:
if (iface->state != IFS_UP)