Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2025 15:53:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 284863] ntpd throws "Address already in use" error with shared IP on multiple interfaces after upgrade from 14.1 to 14.2
Message-ID:  <bug-284863-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284863

            Bug ID: 284863
           Summary: ntpd throws "Address already in use" error with shared
                    IP on multiple interfaces after upgrade from 14.1 to
                    14.2
           Product: Base System
           Version: 14.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: leif@ofWilsonCreek.com

After upgrading from FreeBSD 14.1 to 14.2, ntpd now fails to start with the
error "Address already in use" when two or more network interfaces are
configured with the same IP address. This behavior was not observed in FreeBSD
14.1 where ntpd would start without issues under the same configuration.

Steps to Reproduce:
1.  Configure two or more network interfaces with the same IP address on a
FreeBSD 14.2 system:
    ifconfig_ena0="inet 10.96.16.8/20"
    ifconfig_tun0="inet 10.96.16.8/32"
2.  Configure ntp.conf as follows:
    server nss.nts.umn.edu burst iburst
    server time.nist.gov burst iburst
    restrict default kod limited nomodify notrap
    restrict -6 default kod limited nomodify notrap
    restrict 127.0.0.1
    restrict -6 ::1
3.  Attempt to start ntpd:
    service ntpd start
4.  Observe the error in syslog, attached below.

Workaround:
Specifying the interface to ntpd sidesteps the problem, for example
`ntpd_flags="--interface=ena0"`. However, this is suboptimal as it requires
explicit interface selection for ntpd.

Configuration details:
ntp.conf 
server nss.nts.umn.edu burst iburst
server time.nist.gov burst iburst
restrict default kod limited nomodify notrap
restrict -6 default kod limited nomodify notrap
restrict 127.0.0.1
restrict -6 ::1

Syslog:

Feb 17 15:04:59 bigbrother ntpd[497]: Command line: /usr/sbin/ntpd -p
/var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g
Feb 17 15:04:59 bigbrother ntpd[498]: Listen and drop on 0 v6wildcard [::]:123
Feb 17 15:04:59 bigbrother ntpd[498]: Listen and drop on 1 v4wildcard
0.0.0.0:123
Feb 17 15:04:59 bigbrother ntpd[498]: Listen normally on 2 ena0
[fe80::c07:6eff:fe7f:d2f4%1]:123
Feb 17 15:04:59 bigbrother ntpd[498]: Listen normally on 3 ena0 10.96.16.8:123
Feb 17 15:04:59 bigbrother ntpd[498]: Listen normally on 4 lo0 [::1]:123
Feb 17 15:04:59 bigbrother ntpd[498]: Listen normally on 5 lo0 [fe80::1%2]:123
Feb 17 15:04:59 bigbrother kernel: pid 498 (ntpd), jid 0, uid 123: exited on
signal 11 (no core dump - other error)
Feb 17 15:04:59 bigbrother ntpd[498]: Listen normally on 6 lo0 127.0.0.1:123
Feb 17 15:04:59 bigbrother ntpd[498]: bind(27) AF_INET 10.96.16.8:123 flags
0x13 failed: Address already in use
Feb 17 15:04:59 bigbrother ntpd[498]: unable to create socket on tun5018 (7)
for 10.96.16.8:123
Feb 17 15:04:59 bigbrother ntpd[497]: daemon child died with signal 11

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-284863-227>