Re: ntp.c : possible inconsistency?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 10 Jan 2007, Bernhard Schiffner wrote:

> > Without a further explanation of this craziness, it's a little hard to
> > discuss...
> Let's try it:
> time_constant is created for internal use of ntp.c and added by 4
> -               time_constant = min(txc->constant + 4, (long)MAXTC);
> +               time_constant = min(txc->constant + 4, (long)MAXTC + 4);

MAXTC is already adjusted.

> But sometimes it is written back to data referenced from outside. So let's do 
> the + 4 backwards ...
> -       txc->constant      = time_constant;
> +       txc->constant      = time_constant - 4;

ntpd doesn't read it back for it's own purposes, it only prints it, when 
the kernel info is queried, it doesn't adjust the constant there, so I 
didn't do it in the kernel either.

bye, Roman

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux