summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-04-19 11:49:51 +0200
committerFelix Fietkau <nbd@openwrt.org>2015-04-19 11:49:51 +0200
commitb0720e584f750073a4bc81c889abdaf08983e0ce (patch)
treeb8778455b5f5bade9750c6db18e5704b9e42e104 /interface.c
parentf7920a7e96e2a1424f69ed3f5ede723c0954b185 (diff)
downloadnetifd-b0720e584f750073a4bc81c889abdaf08983e0ce.tar.gz
interface: allow an interface to specify device configs even when there are other interfaces attached to the same device
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/interface.c b/interface.c
index 3281b70..ea018ad 100644
--- a/interface.c
+++ b/interface.c
@@ -525,9 +525,11 @@ interface_set_device_config(struct interface *iface, struct device *dev)
if (!dev || !dev->default_config)
return;
- if (!iface->device_config && !dev->iface_config)
+ if (!iface->device_config &&
+ (!dev->iface_config || dev->config_iface != iface))
return;
+ dev->config_iface = iface;
dev->iface_config = iface->device_config;
device_apply_config(dev, dev->type, iface->config);
}