On Thursday, September 25, 2014 2:27:01 PM UTC+8, Hari Mahadevan wrote:
> On Thursday, September 25, 2014 2:23:13 PM UTC+8, Hari Mahadevan wrote:
> 
> > Does anybody know why the IP address reported in NTP log messages is always 
> > 0.0.0.0?
> 
> > 
> 
> > 
> 
> > 
> 
> > For example the message written while stepping the clock looks like this:
> 
> > 
> 
> > 
> 
> > 
> 
> > Sep 25 13:03:47 ntpd[1818]: 0.0.0.0 061c 0c clock_step +340.491291 s
> 
> > 
> 
> > 
> 
> > 
> 
> > I looked into ntpd source and it's always passing a NULL for 
> > report_event()'s second parameter where it should be passing the peer with 
> > which the local clock is being sync'ed. Interestingly the peer information 
> > is available, yet it's not being passed as second argument. Why?
> 
> > 
> 
> > 
> 
> > 
> 
> > TIA.
> 
> > 
> 
> > 
> 
> > 
> 
> > Hari
> 
> 
> 
> The source code I'm referring to is in ntpd/ntp_loopfilter.c, line number 
> 386. report_event is defined in ntpd/ntp_control.c, line number 2929.

I modified the code replacing the NULL in report_event() call with peer local 
variable and it works fine. Now the clock_step log message does print the IP 
address of the peer that was the source of the clock sync.

Anyone knows why this parameter is set to NULL, not just in this one 
report_event() call, but in all report_event() calls in the loopfilter 
function? Specifically, I want to know if it's due to potential run-time errors 
that can bring down the daemon.

Thanks!

_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to