diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-11-18 13:38:17 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-11-18 13:38:19 +0100 |
commit | 351d690f1a09e062ef951ac406ee571e1f1fe3e6 (patch) | |
tree | a142451fac10848da5970c65ee3ac9ce92e0f2a9 /wireless.c | |
parent | 4a41135750d97e06d1f6d808a9d24bb4b472aca4 (diff) | |
download | netifd-351d690f1a09e062ef951ac406ee571e1f1fe3e6.tar.gz |
wireless: fix passing bridge name for vlan hotplug pass-through
When preparing the interface for hotplug add, pass the bridge
device back to the caller, since it may not match the original device
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'wireless.c')
-rw-r--r-- | wireless.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -136,7 +136,7 @@ vif_config_add_bridge(struct blob_buf *buf, struct blob_attr *networks, bool pre if (!dev) return; - if (!dev->type->bridge_capability) + if (!dev->hotplug_ops) return; } @@ -144,7 +144,10 @@ vif_config_add_bridge(struct blob_buf *buf, struct blob_attr *networks, bool pre return; if (dev->hotplug_ops && dev->hotplug_ops->prepare) - dev->hotplug_ops->prepare(dev); + dev->hotplug_ops->prepare(dev, &dev); + + if (!dev || !dev->type->bridge_capability) + return; blobmsg_add_string(buf, "bridge", dev->ifname); |