Fix NXDOMAIN RCODE in auth PTR replies.

This commit is contained in:
Simon Kelley
2014-04-03 21:16:40 +01:00
parent b7639d5815
commit 10068600f8
2 changed files with 8 additions and 2 deletions

View File

@@ -80,6 +80,10 @@ version 2.69
encountered. Thanks to Andy and the rt-n56u project for encountered. Thanks to Andy and the rt-n56u project for
find this and helping to chase it down. find this and helping to chase it down.
Fix wrong RCODE in authoritative DNS replies to PTR queries. The
correct answer was included, but the RCODE was set to NXDOMAIN.
Thanks to Craig McQueen for spotting this.
version 2.68 version 2.68
Use random addresses for DHCPv6 temporary address Use random addresses for DHCPv6 temporary address

View File

@@ -231,8 +231,10 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
} while ((crecp = cache_find_by_addr(crecp, &addr, now, flag))); } while ((crecp = cache_find_by_addr(crecp, &addr, now, flag)));
if (!found) if (found)
log_query(flag | F_NEG | F_NXDOMAIN | F_REVERSE | F_AUTH, NULL, &addr, NULL); nxdomain = 0;
else
log_query(flag | F_NEG | F_NXDOMAIN | F_REVERSE | (auth ? F_AUTH : 0), NULL, &addr, NULL);
continue; continue;
} }