Commit 4e1fe444 authored by Simon Kelley's avatar Simon Kelley

Terminate DS-search when reaching the root via cache entries.

parent 51967f98
...@@ -1328,6 +1328,10 @@ static int send_check_sign(time_t now, struct dns_header *header, size_t plen, c ...@@ -1328,6 +1328,10 @@ static int send_check_sign(time_t now, struct dns_header *header, size_t plen, c
continue; continue;
} }
/* Reached the root */
if (!name_start)
return STAT_BOGUS;
strcpy(keyname, name_start); strcpy(keyname, name_start);
return STAT_NEED_DS_NEG; return STAT_NEED_DS_NEG;
} }
...@@ -1412,6 +1416,13 @@ static int tcp_check_for_unsigned_zone(time_t now, struct dns_header *header, s ...@@ -1412,6 +1416,13 @@ static int tcp_check_for_unsigned_zone(time_t now, struct dns_header *header, s
continue; continue;
} }
/* reached the root */
if (!name_start)
{
free(packet);
return STAT_BOGUS;
}
m = dnssec_generate_query(header, ((char *) header) + 65536, name_start, class, T_DS, &server->addr); m = dnssec_generate_query(header, ((char *) header) + 65536, name_start, class, T_DS, &server->addr);
/* We rely on the question section coming back unchanged, ensure it is with the hash. */ /* We rely on the question section coming back unchanged, ensure it is with the hash. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment