diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2016-11-21 15:05:07 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-11-22 10:44:59 +0100 |
commit | 97692acd9e00d3c57cd399fbb0980717d4033659 (patch) | |
tree | 0346947f88052c82d6f6bb6dccbb608133faf5e7 /ubus.c | |
parent | 96c53518ffdd470768a224fbdb697294639a8370 (diff) |
ubus: Use device_find to find a device when displaying device info
Replace device_get by device_find in netifd_dev_status as device_get
will fail to find the device if it's created via config as an aliased
vlan device in dotted notation (eg @iface.200).
In such case get_vlan_device_chain will figure out the layer3 device
but get_vlan_device will not find the vlan device in the dependency
list of the layer 3 device as it has been created as a dependency of
the aliased device.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'ubus.c')
-rw-r--r-- | ubus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -204,7 +204,7 @@ netifd_dev_status(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_parse(dev_policy, __DEV_MAX, tb, blob_data(msg), blob_len(msg)); if (tb[DEV_NAME]) { - dev = device_get(blobmsg_data(tb[DEV_NAME]), false); + dev = device_find(blobmsg_data(tb[DEV_NAME])); if (!dev) return UBUS_STATUS_INVALID_ARGUMENT; } |