mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
When res_send() fails, we should reserve an error code.
This commit is contained in:
parent
c147998f53
commit
d05ad2ab4d
1 changed files with 2 additions and 2 deletions
|
|
@ -2358,9 +2358,9 @@ res_queryN(name, target, res)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (n < 0 || n > anslen)
|
||||
if (n > anslen)
|
||||
hp->rcode = FORMERR; /* XXX not very informative */
|
||||
if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
|
||||
if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
|
||||
rcode = hp->rcode; /* record most recent error */
|
||||
#ifdef DEBUG
|
||||
if (res->options & RES_DEBUG)
|
||||
|
|
|
|||
Loading…
Reference in a new issue