[ntp:questions] ntpd deletes IPv6 interface after startup

Frank Kardel kardel at ntp.org
Sun Nov 11 15:38:20 UTC 2007


your observation seem correct. I have no idea why the ifiter code
skips IPv6 interfaces on the second round. There seems to be a bug
there. ifiter must return the complete currently valid interface list or
the interface scanning code will not work correctly.
Have you checked via ifconfig -a that the interface are still listed
when ifiter fails to enumerate them  ?

Please file a bug at http://bugs.ntp.org. Be sure to include detailed
information about your operating system.

Hauke Lampe wrote:
> Hello.
> After updating from 4.2.0a to 4.2.4p4, I experience some problems getting 
> the IPv6 interface to work again. It did work with 4.2.0a.
4.2.0a only did the first scan - - no surprise that it worked there.

> ntpd initializes the interface at startup and then deletes it immediately 
> afterwards. I tracked the problem down to update_interfaces() in ntp_io.c 
> where the interfaceiter in phase I skips the 6-to-4 interface (and others) 
> the second and further times the function is called. Thus the interface 
> structure's phase field is not updated and phase II marks the interface as 
> "GONE" and deletes it.
Correct analysis.
> I haven't found out why the iterator skips the interfaces, yet. Doesn't it 
> always use the same set of interfaces returned by getifaddrs()?
It should - maybe its a porting issue or some other problem in the 
ifiter/getifaddrs area.

> I saved debug output from the first and second call to update_interfaces() 
> here:
> http://tinyurl.com/2khp5k
> As a workaround, I disabled interface updates (-U 0) and now ntpd keeps 
> listening on all interfaces.
Yes, it only does the first and sucessful scan.
> Hauke.


More information about the questions mailing list