opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.38k stars 757 forks source link

Network Time interface list does not include interfaces with only IPv6 address #7934

Open paul8046 opened 1 month ago

paul8046 commented 1 month ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

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:

  1. Define an interface with only an IPv6 address
  2. 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

fichtner commented 1 month ago

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.