[ntp:questions] ntpd (4.2.2p1) stays "synchronized to LOCAL"

Danny Mayer mayer at ntp.isc.org
Fri Dec 8 03:18:59 UTC 2006


Miroslav Lichvar wrote:
> On Mon, Dec 04, 2006 at 10:07:25PM -0500, Danny Mayer wrote:
>> Jordan Russell wrote:
>>> My ntpd is no longer synchronizing with the servers specified in
>>> ntp.conf, and I'm having trouble figuring out why.
>>>
>>> ntp.conf looks like this:
>>>
>>> restrict default kod nomodify notrap nopeer noquery
>>> restrict -6 default kod nomodify notrap nopeer noquery
>> I believe that this is a duplicate line to the one above since default
>> is not specific to any IP stack.
> 
> The second line is required, at least in ntp-4.2.2. From ntp_config.c:
> 
> case CONFIG_RESTRICT:
> 	...
> 	/*
> 	 * Assume default means an IPv4 address,
> 	 * except
> 	 * if forced by a -4 or -6.
> 	 */
> 	if (STREQ(tokens[istart], "default")) {
> 		if (peeraddr.ss_family == 0)
> 			peeraddr.ss_family = AF_INET;
> 
> 

Then that's a bug since it shouldn't be specific to the IP stack, at
least as far as I'm concerned. It should be valid for both by default as
are all the other commands. Thanks for looking, I've been too swamped
with other issue to look at it.

Danny



More information about the questions mailing list