netifd: Check interface autostart parameter when handling interface state changes
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 20 Mar 2014 07:59:04 +0000 (08:59 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 20 Mar 2014 13:55:16 +0000 (14:55 +0100)
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>
interface.c

index 39460e4..4a3a725 100644 (file)
@@ -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: