mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-19 19:51:01 +00:00
Fix wrong reply to simple name when --domain-needed set and no servers configured.
Also return REFUSED and not SERVFAIL when out of memory. Thanks to Allain Legacy for problem report.
This commit is contained in:
1 parent
f7443d76f7
commit
d05dd58de1
3 files changed
+17
-9
No files matched your search
+1
-3
@@ -896,9 +896,7 @@ size_t setup_reply(struct dns_header *header, size_t qlen,
|
||||
header->nscount = htons(0);
|
||||
header->arcount = htons(0);
|
||||
header->ancount = htons(0); /* no answers unless changed below */
|
||||
if (flags == F_NEG)
|
||||
SET_RCODE(header, SERVFAIL); /* couldn't get memory */
|
||||
else if (flags == F_NOERR)
|
||||
if (flags == F_NOERR)
|
||||
SET_RCODE(header, NOERROR); /* empty domain */
|
||||
else if (flags == F_NXDOMAIN)
|
||||
SET_RCODE(header, NXDOMAIN);
|
||||
|
||||
Reference in new issue
Block a user