summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-14 04:40:44 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-14 04:40:44 +0200
commitca3f00d45e72c4b28b2ce39afc9543fa2f225020 (patch)
tree07589adfd013188a4737a4d631eecb5346f3dd93 /interface.c
parent2f47fa5db2ce0fbe118ed9b6727c3956a48c85fb (diff)
flush routes after bringing up/down an interface
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/interface.c b/interface.c
index 0a85e6f..e0c2c78 100644
--- a/interface.c
+++ b/interface.c
@@ -240,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);
@@ -249,6 +250,7 @@ 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)