ntpq mrulist bug

Eric S. Raymond esr at thyrsus.com
Thu Nov 21 07:23:41 UTC 2019


Hal Murray <hmurray at megapathdsl.net>:
> Part of the problem is that there is a lot of cruft in that area.  For 
> example, grep for CERR_
> There is a clump of signals defined as part of a ControlSession, none are ever 
> raised, a few are caught.  Looks like somebody decided to rename things to 
> SERR and never got around to finishing the cleanup.
> 
> There is another case were stuff is returned a couple of layers, but then 
> never used used.

I have unfortunate news for you.  I think both those "features" were
in the C version (I'm sure about the CERR/SERR duplication). The C was
so grotty that I did not dare attempt anything but the most literal
sort of translation of the lower layers. 

I got the distinct impression that the C was halfway through someone
else's rewrite that never got finished.  Looks to me like somebody was
moving towards having a C client layer for Mode 6 that could be
detached from the ntpq upper level.  I completed that part, basically
by cutting along the right dotted lines and dsturbing the ugly code
as little as I could get away with.

I did do some cleanup after the literal translation, but not in the
parts I was afraid to touch (the packet-reassembly code in
particular). You can be pretty sure I didn't introduce any complexity
that wasn't there before.

> [for, else]
> > That's a Pythonism.  An else clause attached to a for executes only if the
> > for ran to complewtion without a break.  In this case, the code checks for a
> > hole in the fragment sequence and sets the response field if there is no
> > hole. 
> 
> Thanks.
> 
> You have a tendency to use legal but uncommon constructs.  Is that a bug or 
> feature?  On the feature side, it makes the code more compact and maybe some 
> of us learn something.  On the bug side, it makes the code harder to 
> understand for those of us who don't mentally collect features.
>
> Is there a collection of obscure features and what they do?  I'd like to scan 
> (and bookmark) something like that.

*blink* How would I know what matches your map of "uncommon"?  How
would I know what features not to use?  I like you, Hal, but
that doesn't mean I can read your freakin' mind.

Ask me to solve something *easy*, like the Halting Problem.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>




More information about the devel mailing list