net/wol: check IPv6 NDP table (get_ndp) in dashboard widget for online status
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, php
- Domain
- backend-api-design, frontend
Research direction
Start with net/wol/src/opnsense/www/js/widgets/WakeOnLan.js and its existing ARP lookup, then check the page-services-wakeonlan entry in net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/ACL/ACL.xml. Add the NDP lookup and allow its API endpoint in the ACL; the widget should report a host online when its MAC and configured interface match in either table. The issue names no tests, so inspect nearby widget checks for the relevant verification path.
Written by the indexing model from the issue text.
Description
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
On dual-stack interfaces where some target hosts communicate exclusively over IPv6 (IPv6-only hosts on a VLAN that still has an IPv4 broadcast address configured on OPNsense for sending L2 WoL magic packets), the Wake-on-LAN dashboard widget (WakeOnLan.js) always displays these hosts as Offline even when they are up and actively communicating with OPNsense.
This happens because WakeOnLan.js only queries /api/diagnostics/interface/get_arp (the IPv4 ARP table, arp -an) and never checks /api/diagnostics/interface/get_ndp (the IPv6 Neighbor Discovery table, ndp -an).
Observed on OPNsense 26.7.10 (os-wol 2.5_4):
arp -anhas no entry for the host's MAC address.ndp -anand/api/diagnostics/interface/get_ndplist the host's MAC as reachable (R/S) on the expected interface (intf_descriptionmatchesitem["%interface"]).
Describe the solution you'd like
- In
net/wol/src/opnsense/www/js/widgets/WakeOnLan.js, query/api/diagnostics/interface/get_ndpalongside/api/diagnostics/interface/get_arp(e.g., viaPromise.all) and mark a host as Online if it matches either:- a non-expired entry in the ARP table on the configured interface (note: using
.some()as proposed in #5790 also handles MACs present on multiple interfaces), or - a matching entry in the NDP table (
obj.mac.toLowerCase() === mac.toLowerCase() && obj.intf_description === intf).
- a non-expired entry in the ARP table on the configured interface (note: using
- In
net/wol/src/opnsense/mvc/app/models/OPNsense/Wol/ACL/ACL.xml, add<pattern>api/diagnostics/interface/get_ndp*</pattern>topage-services-wakeonlan(matching commit 0e62a49924 which addedapi/diagnostics/interface/get_arp*).
Describe alternatives you've considered
- Assigning an IPv4 address to IPv6-only servers just to populate the ARP cache — undesirable in an IPv6-only server environment.
- Optionally, note that
list_ndp.pycurrently filters out(incomplete)entries and returns{mac, ip, intf, manufacturer}(plusintf_descriptionadded byInterfaceController::getNdpAction()), without exposing the NDP neighbor state (R/S/D/P) or expiration. If maintainers prefer distinguishingReachablevsStale/expiredentries, that could be considered inopnsense/core(list_ndp.py) as a follow-up.
Additional context
- Environment: OPNsense 26.7.10 (amd64),
os-wol2.5_4. - Related: #5790 (refactor of
checkActive()inWakeOnLan.jsfromfind()tosome()), commit 0e62a49924 (ACL.xmlpattern forget_arp*). - I'm happy to open a PR once the preferred approach is confirmed.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 926
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opnsense/plugins
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directiveOpenincomplete
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
opnsense/plugins#5973 · 1 comment ·
Maintainers usually reply within 1 day
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)Possibly taken @bringha1 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
q-feeds-connector: "error in configd communication" every update when the Unbound DNSBL rebuild takes longer than 120sPossibly taken @mhatipog claimed this 9 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
All issues in opnsense/plugins
Similar issues
-
15.0
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-php-distro#176 ·
Maintainers usually reply within 2 days
-
No Code Attached Yet
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
joomla/joomla-cms#48941 ·
Maintainers usually reply within 1 day
-
needs-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug new
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
moodle-an-hochschulen/moodle-theme_boost_union#1500 ·
Maintainers usually reply within 1 day