[ntp:questions] ntp broadcast not working with IPv6

Dave Hart davehart at gmail.com
Fri Dec 9 15:27:37 UTC 2011


On Wed, Dec 7, 2011 at 09:53, rakesh v <rakeshvanam at gmail.com> wrote:
> Hi Danny,
> Actually I ran the ntpd with Debug option before with a downloaded source
> code (ntp-4.26p4).
>
> These are the logs Iam seeing on the client side...
>
> * 6 Dec 06:11:52 ntpd[2884]: bind(25) AF_INET6 ff02::101#123 (multicast)
> flags 0x0 failed: Invalid argument*

This is unexpected.  ntpd expects non-Windows systems to listen for
multicast by binding a socket to each multicast group address.

> * 6 Dec 06:11:52 ntpd[2884]: multicast address ff02::101 using wildcard
> interface #1 v6wildcard*
> * 6 Dec 06:11:52 ntpd[2884]: Joined :: socket to multicast group ff02::101*

As you can see, there's fallback code to attempt to use the wildcard
interface, but I doubt that will work out for you, even if you add
"interface listen ::" to override the default behavior of dropping all
traffic received via the wildcard interface.  This is because ntpd
typically depends on determining the  destination address based on the
socket on which the packet was received.

I note the following paragraph in "man ipv6" on a Debian stable system:

       Linux  2.4  will  break  binary  compatibility for the sockaddr_in6 for
       64-bit hosts by changing the alignment of in6_addr and adding an  addi-
       tional sin6_scope_id field.  The kernel interfaces stay compatible, but
       a program including sockaddr_in6 or in6_addr into other structures  may
       not be.  This is not a problem for 32-bit hosts like i386.

Since you saw the problem even when building ntpd from source, this
seems unlikely to be the cause of your problem, but it seemed worth
mentioning.  I'd suggest trying to determine what is causing the
bind() to ff02::101 to fail on your system.

Cheers,
Dave Hart


More information about the questions mailing list