diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2014-03-01 18:07:57 +0000 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2014-03-01 18:07:57 +0000 |
commit | 0575610fa136d5c6afe951fcbad76841230a808e (patch) | |
tree | 35b1d09c60cafb9336a3833140d8d431b3ae877c | |
parent | e3f14558509e2ec3f486f1a1594621a8ebcf02be (diff) | |
download | dnsmasq-0575610fa136d5c6afe951fcbad76841230a808e.tar.gz |
Handle replies with no answers and no NS in validate_reply.
-rw-r--r-- | src/dnssec.c | 4 |
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++) { |