From: Felix Fietkau Date: Thu, 12 Apr 2012 13:59:29 +0000 (+0200) Subject: flush interface ip state after the interface has been brought down, fixes ppp default... X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=3297b82e0b7244430ad5a1ca25d1e7b4c046c00a flush interface ip state after the interface has been brought down, fixes ppp defaultroute issues --- diff --git a/interface.c b/interface.c index 0aa5c5a..b7c33b7 100644 --- a/interface.c +++ b/interface.c @@ -143,6 +143,8 @@ mark_interface_down(struct interface *iface) if (iface->state == IFS_UP) interface_event(iface, IFEV_DOWN); interface_flush_state(iface); + interface_ip_flush(&iface->config_ip); + interface_ip_flush(&iface->proto_ip); iface->state = IFS_DOWN; } @@ -158,8 +160,6 @@ __interface_set_down(struct interface *iface, bool force) if (iface->state == IFS_UP) interface_event(iface, IFEV_DOWN); iface->state = IFS_TEARDOWN; - interface_ip_flush(&iface->config_ip); - interface_ip_flush(&iface->proto_ip); interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, force); if (force) interface_flush_state(iface);