Code tidy.

This commit is contained in:
Simon Kelley
2014-01-26 23:39:17 +00:00
parent 6938f3476e
commit 6f4681034e

View File

@@ -796,17 +796,15 @@ int dnssec_validate_by_ds(time_t now, struct dns_header *header, size_t plen, ch
GETLONG(ttl, p);
GETSHORT(rdlen, p);
if (qclass != class || qtype != T_DNSKEY || rc == 2)
{
if (ADD_RDLEN(header, p, plen, rdlen))
continue;
return STAT_INSECURE; /* bad packet */
}
if (!CHECK_LEN(header, p, plen, rdlen) || rdlen < 4)
return STAT_INSECURE; /* bad packet */
if (qclass != class || qtype != T_DNSKEY || rc == 2)
{
p += rdlen;
continue;
}
psave = p;
GETSHORT(flags, p);