From 245527193e90906451be35c2b8e972b8712ea6ab Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 17 Dec 2015 00:13:54 +0100 Subject: [PATCH] interface: toggle proto_ip along with config_ip to fix ordering issues with routes/rules added dynamically Signed-off-by: Felix Fietkau --- interface.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } } -- 2.30.2