diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-12-17 00:13:54 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-12-17 00:13:54 +0100 |
commit | 245527193e90906451be35c2b8e972b8712ea6ab (patch) | |
tree | 08fa7805112c4f25c4b6f794c7b3f5d585eddb62 | |
parent | 4ad7ac2f71e274fa8f80fecd359f1c7645ef68cc (diff) |
interface: toggle proto_ip along with config_ip to fix ordering issues with routes/rules added dynamically
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/interface.c b/interface.c index ffe7988..2638342 100644 --- a/interface.c +++ b/interface.c @@ -240,6 +240,7 @@ mark_interface_down(struct interface *iface) if (state == IFS_UP) interface_event(iface, IFEV_DOWN); interface_ip_set_enabled(&iface->config_ip, false); + interface_ip_set_enabled(&iface->proto_ip, false); interface_ip_flush(&iface->proto_ip); interface_flush_state(iface); system_flush_routes(); @@ -664,6 +665,7 @@ interface_proto_event_cb(struct interface_proto_state *state, enum interface_pro interface_set_l3_dev(iface, iface->main_dev.dev); interface_ip_set_enabled(&iface->config_ip, true); + interface_ip_set_enabled(&iface->proto_ip, true); system_flush_routes(); iface->state = IFS_UP; iface->start_time = system_get_rtime(); @@ -873,6 +875,7 @@ interface_set_l3_dev(struct interface *iface, struct device *dev) return; interface_ip_set_enabled(&iface->config_ip, false); + interface_ip_set_enabled(&iface->proto_ip, false); interface_ip_flush(&iface->proto_ip); device_add_user(&iface->l3_dev, dev); @@ -882,6 +885,7 @@ interface_set_l3_dev(struct interface *iface, struct device *dev) return; } interface_ip_set_enabled(&iface->config_ip, enabled); + interface_ip_set_enabled(&iface->proto_ip, enabled); } } |