projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd72e1c
)
rpcd-mod-luci: update filter for rpc_luci_get_network_devices
author
Markus Stockhausen
<
[email protected]
>
Tue, 28 Jun 2022 08:54:48 +0000
(10:54 +0200)
committer
Markus Stockhausen
<
[email protected]
>
Tue, 28 Jun 2022 09:06:23 +0000
(11:06 +0200)
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 <
[email protected]
>
libs/rpcd-mod-luci/src/luci.c
patch
|
blob
|
history
diff --git
a/libs/rpcd-mod-luci/src/luci.c
b/libs/rpcd-mod-luci/src/luci.c
index ff656ec212b692b5fbbaf1d67720dfbf11ecbfec..131180a750a23eb78d043e075981bd1a16cbc79e 100644
(file)
--- a/
libs/rpcd-mod-luci/src/luci.c
+++ b/
libs/rpcd-mod-luci/src/luci.c
@@
-849,7
+849,7
@@
rpc_luci_get_network_devices(struct ubus_context *ctx,
if (e == NULL)
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);
}