[ntp:hackers] Where did BLOCKING_REQ_MAGIC and BLOCKING_RESP_MAGIC get their values?
hmurray at megapathdsl.net
Mon Jul 29 16:15:19 UTC 2013
brian.utterback at oracle.com said:
> I understand why there is a warning, but are they arbitrary or not? Is
> there something outside the code that dictates their values? If not, I
> don't understand why a 1 and 2 or even 0 and 1 wouldn't work just as well.
> If there is some reason why sinple number won't work here, how about the
> same numbers but without the sign bit set?
I just took a quick scan at the code.
I think they are only used to sanity check the blocks of memory passed
to/from the child or thread doing DNS lookups. I didn't find a comment that
said DNS, but I didn't look very hard and that's the only place I know of
where ntpd uses forks/threads. In particular, those bits don't go out on the
wire so it should be OK to change them.
As a sanity check, 0 and 1 aren't very good.
If it cleans up a warning in your environment, I'd vote for turning off the
top bits. I just tried it and didn't break anything.
Are enums signed or unsigned? I didn't find any warnings like that in any of
my log files.
These are my opinions. I hate spam.
More information about the hackers