Commit 150162bc authored by Simon Kelley's avatar Simon Kelley

Return SERVFAIL when validation abandoned.

parent 88052830
...@@ -663,6 +663,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server ...@@ -663,6 +663,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
header->ancount = htons(0); header->ancount = htons(0);
header->nscount = htons(0); header->nscount = htons(0);
header->arcount = htons(0); header->arcount = htons(0);
header->hb3 &= ~HB3_TC;
} }
/* the bogus-nxdomain stuff, doctor and NXDOMAIN->NODATA munging can all elide /* the bogus-nxdomain stuff, doctor and NXDOMAIN->NODATA munging can all elide
...@@ -991,7 +992,10 @@ void reply_query(int fd, int family, time_t now) ...@@ -991,7 +992,10 @@ void reply_query(int fd, int family, time_t now)
char *result; char *result;
if (forward->work_counter == 0) if (forward->work_counter == 0)
result = "ABANDONED"; {
result = "ABANDONED";
status = STAT_BOGUS;
}
else else
result = (status == STAT_SECURE ? "SECURE" : (status == STAT_INSECURE ? "INSECURE" : "BOGUS")); result = (status == STAT_SECURE ? "SECURE" : (status == STAT_INSECURE ? "INSECURE" : "BOGUS"));
...@@ -1938,7 +1942,10 @@ unsigned char *tcp_request(int confd, time_t now, ...@@ -1938,7 +1942,10 @@ unsigned char *tcp_request(int confd, time_t now,
char *result; char *result;
if (keycount == 0) if (keycount == 0)
result = "ABANDONED"; {
result = "ABANDONED";
status = STAT_BOGUS;
}
else else
result = (status == STAT_SECURE ? "SECURE" : (status == STAT_INSECURE ? "INSECURE" : "BOGUS")); result = (status == STAT_SECURE ? "SECURE" : (status == STAT_INSECURE ? "INSECURE" : "BOGUS"));
......
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