If rcode is SERVFAIL, there is no need to look at the packet.
authorflorian <florian@openbsd.org>
Tue, 18 Apr 2023 09:57:51 +0000 (09:57 +0000)
committerflorian <florian@openbsd.org>
Tue, 18 Apr 2023 09:57:51 +0000 (09:57 +0000)
commit09899521c9c575927ab5ebfe57157ea6f50ee31a
tree5183f1b83cefb5225bca38b43da97649be3ab44f
parent43bd63ce9688e1aa63c59d9420c1792c4dca6206
If rcode is SERVFAIL, there is no need to look at the packet.

This pulls the check for rcode up, before we check if the answer
packet has sensible length. Since we are not touching the packet at
all, we don't care about the size and don't need to log if the size is
wrong from a DNS perspective.

With asr error reporting improved in the previous commit, this
probably gets rid of all "bad packet: too short" messages.

OK semarie
sbin/unwind/resolver.c