Network Time interface list does not include interfaces with only IPv6 address
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
Network Time allows the selection of interfaces to which ntpd will bind. It is intended that interfaces without an IP address will not be shown. However the actually behaviour is to not show interfaces without an IPv4 address. Interfaces with only an IPv6 address should be selectable but do not appear on the list.
To Reproduce
Steps to reproduce the behavior:
- Define an interface with only an IPv6 address
- Attempt to select this interface under Services -> Network Time -> General
Expected behavior
Selection should be available
Environment
OPNsense 24.4.2-amd64 FreeBSD 13.2-RELEASE-p12 OpenSSL 3.0.14
The problem seems to be both here:
https://github.com/opnsense/core/blob/b5ca261e18915f5c5962e7f5b1d625d44dd28f64/src/www/services_ntpd.php#L337-L339
And here:
https://github.com/opnsense/core/blob/b5ca261e18915f5c5962e7f5b1d625d44dd28f64/src/etc/inc/plugins.inc.d/ntpd.inc#L436-L441
I'll try to propose a patch today.
Hmm looks like a patch was written as 92dec33 but I've forgot to follow up here. Are you still interested?
I'm not sure I fully understand your question. I'm not currently in the position to test the patch if that's what you mean.
@paul8046
I'm not currently in the position to test the patch if that's what you mean.
How can we proceed if you won't be able to test? Interest in this seems very low overall.
Just in case, the patch installs with:
# opnsense-patch 6c95d57
And deinstalls with the same command.
Cheers, Franco