X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=interface.c;h=e0c2c789dcdc402afcd1843f2d85b96695d1c6cb;hb=b314737e9a0f0df710ba5e8691882cd7d42faaf5;hp=37b20cc9c03b13f4eb0a85bc1be494f04dc53be1;hpb=41842d3f91733786cb4d2bcdc6ca0c3a1a1c594b;p=project%2Fnetifd.git diff --git a/interface.c b/interface.c index 37b20cc..e0c2c78 100644 --- a/interface.c +++ b/interface.c @@ -85,6 +85,7 @@ interface_event(struct interface *iface, enum interface_event ev) 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) @@ -239,6 +240,7 @@ interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve if (iface->state != IFS_SETUP) return; + system_flush_routes(); iface->state = IFS_UP; iface->start_time = system_get_rtime(); interface_event(iface, IFEV_UP); @@ -248,8 +250,11 @@ interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve if (iface->state == IFS_DOWN) return; + system_flush_routes(); mark_interface_down(iface); interface_handle_config_change(iface); + if (iface->autostart) + __interface_set_up(iface); break; case IFPEV_LINK_LOST: if (iface->state != IFS_UP)