Another maxpoll mixup

Hal Murray hmurray at megapathdsl.net
Tue Sep 27 19:59:44 UTC 2016


gem at rellim.com said:
> It it called newpeer() there would be no problem.  That function tests for
> NTP_MAXPOLL_UNK and handles the case. 

Yes, but your code is buggy.

Here is your code (with a few lines omitted):

        if (NTP_MAXPOLL_UNK == maxpoll)
            /* not set yet, set to default */
            peer->maxpoll = NTP_MAXDPOLL;
        peer->maxpoll = max(maxpoll, NTP_MINPOLL);


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list