Re:Show HN: MassDNS – A high-performance DNS stub resolver in C
by blechschmidt on Sunday June 26, 2016 @10:22AM
(#11980904)
This is the line of code that pre-checks whether an incoming packet should be parsed at all. If it is not a response packet or if the number of questions is not one, it should not be parsed, simply because the packet parsing function expects a reply packet with exactly one question, namely the one that has been queried for.
[ Parent
| on HN ]
Re:Show HN: MassDNS – A high-performance DNS stub resolver in C
by abhorrence on Sunday June 26, 2016 @11:09AM
(#11981094)
Operator precedence causes it to be interpreted as:
if ((packet->flags & (DNS_RESPONSE_FLAG == 0)) || (packet->questioncount != 1))
which at least does not read as intended.
Re:Show HN: MassDNS – A high-performance DNS stub resolver in C
by blechschmidt on Sunday June 26, 2016 @11:20AM
(#11981136)
You are correct. Has been fixed.