mirror of
https://github.com/openwrt/luci.git
synced 2025-12-22 01:44:35 +04:00
rpcd-mod-luci: update filter for rpc_luci_get_network_devices
When kernel bonding module is loaded it will create a special file /sys/class/net/bonding_masters. This is no network device. Filter it out for getNetworkDevices() call. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This commit is contained in:
@@ -849,7 +849,7 @@ rpc_luci_get_network_devices(struct ubus_context *ctx,
|
|||||||
if (e == NULL)
|
if (e == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (strcmp(e->d_name, ".") && strcmp(e->d_name, ".."))
|
if (e->d_type != DT_DIR && e->d_type != DT_REG)
|
||||||
rpc_luci_parse_network_device_sys(e->d_name, ifaddr);
|
rpc_luci_parse_network_device_sys(e->d_name, ifaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user