summaryrefslogtreecommitdiffhomepage
path: root/device.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-05-06 20:02:00 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-05-06 20:02:00 +0200
commit27cecc14302de7ed2c5cbb63e6969dd7e77f893a (patch)
tree66ada12bff4cf8f017dfa6a519eff55f7eece855 /device.c
parent023db1ca8f352a646700f2d60c397fb89492f4c8 (diff)
device: prevent interface up/down calls for external devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'device.c')
-rw-r--r--device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/device.c b/device.c
index f484c28..7d606c6 100644
--- a/device.c
+++ b/device.c
@@ -61,6 +61,9 @@ void device_unlock(void)
static int set_device_state(struct device *dev, bool state)
{
+ if (dev->external)
+ return 0;
+
if (state)
system_if_up(dev);
else