summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2014-03-20 08:59:04 +0100
committerFelix Fietkau <nbd@openwrt.org>2014-03-20 14:55:16 +0100
commit77b48da58865ff36c545540faa6cd7e1754b74e5 (patch)
treebfc6a974a057b202c68ffdab14c3d9be2d7a853a
parent9cf7219d554f73c014b9c6efde7965384d8346ec (diff)
netifd: Check interface autostart parameter when handling interface state changes
Fixes an issue when 2 interfaces make use of the same ifname (device) and one of the interfaces has autostart disabled; bringing up the other interface would also start the interface for which autostart is disabled (link_state and enabled will both be true for the autostart disabled interface and thus a setup will be launched) Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface.c b/interface.c
index 39460e4..4a3a725 100644
--- a/interface.c
+++ b/interface.c
@@ -273,7 +273,7 @@ interface_check_state(struct interface *iface)
}
break;
case IFS_DOWN:
- if (iface->enabled && iface->link_state && !config_init)
+ if (iface->autostart && iface->enabled && iface->link_state && !config_init)
__interface_set_up(iface);
break;
default: