diff --git a/configure.ac b/configure.ac index b206691..cc79f13 100644 --- a/configure.ac +++ b/configure.ac @@ -102,13 +102,13 @@ if test x"$transparent_enabled" = x"yes"; then fi dnl Include support for reverse dns to match IP network/mask ? -AH_TEMPLATE([RDNS_ENABLE], - [Include support for reverse dns to match IP network/mask. This is best used with nscd enabled to minimise DNS resolution delays]) +AH_TEMPLATE([FDNS_ENABLE], + [Include support for forward dns to match IP network/mask. This is best used with nscd enabled to minimise DNS resolution delays]) TP_ARG_ENABLE(rdns, - [Enable support for reverse dns to match IP network/mask (default is NO)], + [Enable support for forward dns to match IP network/mask (default is NO)], no) -if test x"$rdns__enabled" = x"yes"; then - AC_DEFINE(RDNS_ENABLE) +if test x"$fdns__enabled" = x"yes"; then + AC_DEFINE(FDNS_ENABLE) fi dnl Let user decide whether he wants support for manpages diff --git a/docs/man5/tinyproxy.conf.txt.in b/docs/man5/tinyproxy.conf.txt.in index e35b27b..53b472e 100644 --- a/docs/man5/tinyproxy.conf.txt.in +++ b/docs/man5/tinyproxy.conf.txt.in @@ -200,7 +200,7 @@ Note that the upstream directive can also be used to null-route a specific target domain/host, e.g.: `upstream http 0.0.0.0:0 ".adserver.com"` -With RDNS enabled the site's IP address will also be matched against the or values in addition to the name or domain match +With FDNS enabled the site's IP address will also be matched against the or values in addition to the name or domain match =item B Tinyproxy creates one thread for each connected client. diff --git a/src/hostspec.c b/src/hostspec.c index 52f4a00..fc48d43 100644 --- a/src/hostspec.c +++ b/src/hostspec.c @@ -2,7 +2,7 @@ #include "hostspec.h" #include "heap.h" #include "network.h" -#ifdef RDNS_ENABLE +#ifdef FDNS_ENABLE #include "log.h" #endif @@ -162,8 +162,8 @@ static int numeric_match(const uint8_t addr[], const struct hostspec *h) return 1; } -#ifdef RDNS_ENABLE -static int reverse_dns_numeric_match(const char *ip, const struct hostspec *h) +#ifdef FDNS_ENABLE +static int dns_numeric_match(const char *ip, const struct hostspec *h) { int ret; struct addrinfo *res, *ressave; @@ -210,8 +210,8 @@ int hostspec_match(const char *ip, const struct hostspec *h) { if(is_numeric_addr) return 0; return string_match (ip, h->address.string); case HST_NUMERIC: -#ifdef RDNS_ENABLE - if(!is_numeric_addr) return reverse_dns_numeric_match(ip, h); +#ifdef FDNS_ENABLE + if(!is_numeric_addr) return dns_numeric_match(ip, h); #endif return numeric_match (numeric_addr, h); case HST_NONE: