luci-mod-status: improve RDNS resolution workflow
authorKonstantin Glukhov <redacted>
Sat, 31 Jan 2026 06:00:27 +0000 (15:00 +0900)
committerPaul Donald <redacted>
Mon, 9 Feb 2026 04:07:45 +0000 (05:07 +0100)
commit8b0195ea67cf7cf75b315eca62baa23e033706f9
tree0d54d63389bbafcf3f9904ab16dff23dfaf29ee8
parent9c4b2ee8dedd4df676ee3e85dc5bda112236806a
luci-mod-status: improve RDNS resolution workflow

- Add new RPC declarations:
  - callLuciRpcGetNetworkDevices
  - callLuciRpcGetDHCPLeases
- Add ethers_cache for MAC-to-hostname mapping
- Replace object literals with Object.create(null) for caches:
  dns_cache, service_cache
- Make sure 'Disable DNS lookups' shows addresses
- Change lookup_queue from array to Set to simplify processing
- Introduce updateDnsCache(addr, name) helper to update caches and remove
  addresses from queues
- Update service lookup to match uppercase cache keys
- Rework address resolution workflow as async/await
  1. DHCP leases
  2. Reverse DNS via callNetworkRrdnsLookup
  3. Host hints / MAC-to-host mapping
  4. Network devices / MAC cache
- Re-write pollData() as async
- Update ACL JSON to grant luci-mod-status access to luci-rpc
  methods: getHostHints, getNetworkDevices, getDHCPLeases

This refactor modernizes the connections view host lookup logic, reduces
redundant RPC queries, and improves maintainability and cache reliability.

Signed-off-by: Konstantin Glukhov <redacted>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js
modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json
git clone https://git.99rst.org/PROJECT