summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-03-01 18:07:57 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-03-01 18:07:57 +0000
commit0575610fa136d5c6afe951fcbad76841230a808e (patch)
tree35b1d09c60cafb9336a3833140d8d431b3ae877c
parente3f14558509e2ec3f486f1a1594621a8ebcf02be (diff)
downloaddnsmasq-0575610fa136d5c6afe951fcbad76841230a808e.tar.gz
Handle replies with no answers and no NS in validate_reply.
-rw-r--r--src/dnssec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dnssec.c b/src/dnssec.c
index 5672ebe..6639188 100644
--- a/src/dnssec.c
+++ b/src/dnssec.c
@@ -1718,6 +1718,10 @@ int dnssec_validate_reply(time_t now, struct dns_header *header, size_t plen, ch
if (neganswer && !have_answer)
*neganswer = 1;
+
+ /* No data, therefore no sigs */
+ if (ntohs(header->ancount) + ntohs(header->nscount) == 0)
+ return STAT_NO_SIG;
for (p1 = ans_start, i = 0; i < ntohs(header->ancount) + ntohs(header->nscount); i++)
{