summaryrefslogtreecommitdiffhomepage
path: root/libs/rpcd-mod-luci/src
AgeCommit message (Collapse)Author
2023-02-07Merge pull request #6104 from dhewg/6gJo-Philipp Wich
luci-mod-network: enable configuring wifi ax networks on the 6G band
2023-02-07rpcd-mod-luci: fix reporting network device flagsJo-Philipp Wich
Fix reporting of ceertain flag values larger than 255, such as IFF_PROMISC by explicitly casting the bit test expression to a boolean result since the implicit integer truncation to uint8_t will turn the `0x100` result of a set IFF_PROMISC bit into just `0x0`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-01-23rpcd-mod-luci: add "hwmodes_text" to the iwinfo info outputAndre Heider
This is a preformatted string like "ac/ax/b/g/n" for presentation. Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-01-23rpcd-mod-luci: reuse infos provided by libiwinfoAndre Heider
Don't hardcode bit/name pairs, instead iterate over what's known to the library and use that instead. This automatically adds the missing ad hwmode and HE80+80 htmode - and any future ones. The only difference in the output is the order of the 'hwmodes' array. Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-08-25rpc-mod-luci: Add support for ccmp-256/gcmp/gcmp-256 ciphersJoerg Werner
Signed-off-by: Joerg Werner <schreibubi@gmail.com>
2022-06-28rpcd-mod-luci: update filter for rpc_luci_get_network_devicesMarkus Stockhausen
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>
2021-10-26rpcd-mod-luci: parse prefix size from DHCPv6 leasesJo-Philipp Wich
Remember the prefix size when parsing odhcpd lease entries and expose it in the ip6addrs array. Fixes: #4345 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-09-22rpcd-mod-luci: fix syntax errorJo-Philipp Wich
Fixes: 45a398e1ed ("rpcd-mod-luci: avoid PTR requests for IPv6 link-local and ULA addrs") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-09-22rpcd-mod-luci: avoid PTR requests for IPv6 link-local and ULA addrsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-09-22rpcd-mod-luci: let IPv4 hostnames take precedence over IPv6 onesJo-Philipp Wich
Do not overwrite IPv4-resolved hostnames with IPv6 ones in case both are available or resolvable. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-14rpcd-mod-luci: refactor host hint gatheringJo-Philipp Wich
- Do not incorrectly put the IP addresses from the rrdns reply into the first hint, instead distribute hostnames to the appropriate hints. - Avoid returning stale lease information from previously parsed records by clearing the static struct before each parse attempt. - Improve existing checks for empty MAC addresses and unspecified IPv6 addresses. Fixes: #5126 Fixes: 87bcf9e923 ("rpcd-mod-luci: Return array of addresses in getHostHints") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-11rpcd-mod-luci: add link details to ubus netdev informationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-05Merge pull request #5070 from blocktrron/pr-luci-wifi6David Bauer
luci-mod-network: add 802.11ax HE support
2021-06-05rpcd-mod-luci: support parsing 11ax HW / HT modesDavid Bauer
Add support for parsing 11ax modes returned from UBUS. This is required so the frontend can display information about supported 11ax operation. Signed-off-by: David Bauer <mail@david-bauer.net>
2021-06-03rpcd-mod-luci: Return array of addresses in getHostHintsNiels Widger
Update luci-rpc's getHostHints method to return two string arrays for each host, `ipaddrs` and `ip6addrs`, each containing the host's IPv4 and IPv6 addresses, respectively. Each array is sorted by a priority derived from the source from which the address was discovered. The current address sources and their priority is as follows (a higher (larger) priority is listed first): - neighbor table entries: 10 - /etc/ethers entries: 50 - DHCP leasefile: 100 - RRDNS queries: 100 - getifaddrs(): 200 - UCI static leases: 200 The existing `ipv4` and `ipv6` string fields for each host in `getHostHints` has been removed. Downstream users of getHostHints still need to be updated. Fixes: #4838 Signed-off-by: Niels Widger <niels@qacafe.com> [squash commits, reformat fixes tag] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-18rpcd-mod-luci: expose devtype and iflink properties in getNetworkDevicesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-02-25rpcd-mod-luci: Fix parsing of DUID-LLT's in duid2eaNiels Widger
Fix parsing of DUID-LLT's in duid2ea. Unlike DUID-LL's, DUID-LLT's have a 32-bit time field between the hardware type and link-layer address fields, see RFC 3315 Sections 9.2 and 9.4: https://tools.ietf.org/html/rfc3315#section-9.2 https://tools.ietf.org/html/rfc3315#section-9.4 therefore, the link-layer address starts at offset 16 instead of 8. Signed-off-by: Niels Widger <niels@qacafe.com>
2021-01-26rpcd-mod-luci: get rid of now unused getDSLStatus ubus rpcAndre Heider
Good riddance. Signed-off-by: Andre Heider <a.heider@gmail.com> Tested-by: Martin Schiller <ms@dev.tdt.de>
2021-01-08rpcd-mod-luci: allow finding suffixed libwinfo.soJo-Philipp Wich
Recent versions ship a version suffixed libiwinfo.so, therefor we cannot rely on a fixed path name anymore. Use globbing to find matching libraries and load the first one we find. Fixes: #4718 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-11-07rpcd-mod-luci: handle lease files from all dnsmasq/odhcpd sectionsJo-Philipp Wich
Fixes: #911, #4303, #4308 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-02rpcd-mod-luci: use correct dlopen() flagsJo-Philipp Wich
Fixes: #3707 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-13rpcd-mod-luci: honour dhcp leases without ip address for host hintsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-14rpcd-mod-luci: handle multiple IPv6 addresses per leaseJo-Philipp Wich
Ref: https://forum.openwrt.org/t/luci-not-showing-2nd-ipv6-address/48271 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-08rpcd-mod-luci: various improvementsJo-Philipp Wich
- Properly handle infinite dnsmasq leases - Use a more efficient approach to free internal AVL trees - Remove redundant uci context creation - Add new getDUIDHints method Fixes: #3277 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03rpcd-mod-luci: properly deal with failing ubus requestsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-03rpcd-mod-luci: handle DHCPv6 leases in dnsmasq lease filee9hack
For DHCPv6, the second entry of a lease is the IAID. The parsing code expects a MAC instead of a IAID. Reported-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-02rpcd-mod-luci: fix crash on not existing uci optionsJo-Philipp Wich
Checking the return value of uci_lookup_ptr() is not enough to ensure that the requested optiomn has actually been found. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-01libs: add rpcd-mod-luciJo-Philipp Wich
Add rpcd-mod-luci, a fast rpcd C plugin for speeding up common backend ubus operations. Signed-off-by: Jo-Philipp Wich <jo@mein.io>