Add --ignore-address option.

This commit is contained in:
Glen Huang
2014-12-27 15:28:12 +00:00
committed by Simon Kelley
parent 83d2ed09fc
commit 32fc6dbe03
6 changed files with 72 additions and 4 deletions

View File

@@ -724,6 +724,10 @@ void reply_query(int fd, int family, time_t now)
if (!(forward = lookup_frec(ntohs(header->id), hash)))
return;
if (daemon->ignore_addr && RCODE(header) == NOERROR &&
check_for_ignored_address(header, n, daemon->ignore_addr))
return;
if ((RCODE(header) == SERVFAIL || RCODE(header) == REFUSED) &&
!option_bool(OPT_ORDER) &&
forward->forwardall == 0)