summaryrefslogtreecommitdiff
path: root/system-linux.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-10 20:03:22 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-05-10 20:03:22 +0200
commita0f359bf861f060d563dd0424d51dac1bf96340c (patch)
tree5a42dfb85fb3426afa254f7f70480d64857c6d23 /system-linux.c
parent8714f17ad66fa29383170ad45b9c150b9818dbdf (diff)
downloadnetifd-a0f359bf861f060d563dd0424d51dac1bf96340c.tar.gz
system-linux: always set the ifindex for hotplug devices on init
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'system-linux.c')
-rw-r--r--system-linux.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/system-linux.c b/system-linux.c
index b513948..7a194ca 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -611,11 +611,8 @@ void system_if_clear_state(struct device *dev)
static char buf[256];
char *bridge;
- if (dev->external)
- return;
-
device_set_ifindex(dev, system_if_resolve(dev));
- if (!dev->ifindex)
+ if (dev->external || !dev->ifindex)
return;
system_if_flags(dev->ifname, 0, IFF_UP);