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>
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;
}