summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-04-03 21:16:40 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2014-04-03 21:16:40 +0100
commit10068600f889338d942c7206c98e889bb3a17d57 (patch)
tree16166f715997900e29635d9854e32544db962dda
parentb7639d58158c6e971535893b407560e136a27994 (diff)
downloaddnsmasq-10068600f889338d942c7206c98e889bb3a17d57.tar.gz
Fix NXDOMAIN RCODE in auth PTR replies.
-rw-r--r--CHANGELOG4
-rw-r--r--src/auth.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e0c91d0..c6a6f20 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -80,6 +80,10 @@ version 2.69
encountered. Thanks to Andy and the rt-n56u project for
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
Use random addresses for DHCPv6 temporary address
diff --git a/src/auth.c b/src/auth.c
index d6fdef6..066a9e4 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -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)));
- if (!found)
- log_query(flag | F_NEG | F_NXDOMAIN | F_REVERSE | F_AUTH, NULL, &addr, NULL);
+ if (found)
+ nxdomain = 0;
+ else
+ log_query(flag | F_NEG | F_NXDOMAIN | F_REVERSE | (auth ? F_AUTH : 0), NULL, &addr, NULL);
continue;
}