doesn't accept ipv6 server specificiation

Bug #303737 reported by Brian J. Murrell
This bug report is a duplicate of:  Bug #305043: ntpd does not support ipv6. Edit Remove
4
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: ntp

I'm trying to migrate (as much as possible) to using IPv6 here in my LAN. I have the network configured and many services now using it, however when I try to add my IPv6 NTP server to the ntp.conf ntpd fails to connect to it.

First attempt was by hostname "ntp.example.com" which resolves as:

;; ANSWER SECTION:
ntp.example.com. 60 IN CNAME linux.example.com.
...
;; ADDITIONAL SECTION:
linux.example.com. 60 IN A 10.75.22.3
linux.example.com. 60 IN AAAA 2001:1234:161:0:2d0:b7ff:fe3f:8b74

Using:

server ntp.example.com

in my /etc/ntp.conf file, ntpd used the IPv4 address. IIUC in the presence of both IPv4 and IPv6 addresses an application that can use IPv6 is supposed to do that in preference to IPv4. That's certainly how everything else I've been using works.

So I tried to specify the server by IP address in /etc/ntp.conf with:

server 2001:1234:161:0:2d0:b7ff:fe3f:8b74

and in daemon.log I got:

Nov 30 12:23:35 pc ntpd[15395]: getaddrinfo: "::1" invalid host address, ignored
Nov 30 12:23:37 pc ntpd_initres[15400]: couldn't resolve `2001:1234:161:0:2d0:b7ff:fe3f:8b74', giving up on it

So is ntpd IPv6 capable in Intrepid or not? It doesn't seem so. netstat reveals it listening to the following ports:

$ sudo netstat -apn | grep :123
udp 0 0 10.75.22.101:123 0.0.0.0:* 15665/ntpd
udp 0 0 192.168.2.2:123 0.0.0.0:* 15665/ntpd
udp 0 0 192.168.1.2:123 0.0.0.0:* 15665/ntpd
udp 0 0 10.75.22.1:123 0.0.0.0:* 15665/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 15665/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 15665/ntpd

On hardy, it does seem to be IPv6 capable:

# netstat -apn | grep :123
udp 0 0 10.75.22.8:123 0.0.0.0:* 4546/ntpd
udp 0 0 10.75.22.3:123 0.0.0.0:* 4546/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 4546/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 4546/ntpd
udp6 0 0 fe80::2d0:b7ff:fe3f:123 :::* 4546/ntpd
udp6 0 0 2001:1234:161:0:2d0:123 :::* 4546/ntpd
udp6 0 0 ::1:123 :::* 4546/ntpd
udp6 0 0 :::123 :::* 4546/ntpd

Is this another Intrepid regression?

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

This is a duplicate of Bug #305043.

I've posted a test fix there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.