summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-04-12 15:59:29 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-04-12 15:59:29 +0200
commit3297b82e0b7244430ad5a1ca25d1e7b4c046c00a (patch)
tree2f6c526c700a7c37d25bef4b0714ded664d752b4 /interface.c
parent3bafc1916e60745ebef60f1de678195824a1f351 (diff)
flush interface ip state after the interface has been brought down, fixes ppp defaultroute issues
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c4
1 files changed, 2 insertions, 2 deletions
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);