Use correct naming of DNS action
This commit is contained in:
parent
6a8db94ea4
commit
306cdfe891
10
configure.ac
10
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
|
||||
|
@ -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 <IP/bits> or <IP/mask> values in addition to the name or domain match
|
||||
With FDNS enabled the site's IP address will also be matched against the <IP/bits> or <IP/mask> values in addition to the name or domain match
|
||||
=item B<MaxClients>
|
||||
|
||||
Tinyproxy creates one thread for each connected client.
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user