doesn't accept ipv6 server specificiation
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:
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:
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[
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:
udp6 0 0 2001:1234:
udp6 0 0 ::1:123 :::* 4546/ntpd
udp6 0 0 :::123 :::* 4546/ntpd
Is this another Intrepid regression?
This is a duplicate of Bug #305043.
I've posted a test fix there.