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
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Include support for reverse dns to match IP network/mask ?
 | 
					dnl Include support for reverse dns to match IP network/mask ?
 | 
				
			||||||
AH_TEMPLATE([RDNS_ENABLE],
 | 
					AH_TEMPLATE([FDNS_ENABLE],
 | 
				
			||||||
	    [Include support for reverse dns to match IP network/mask. This is best used with nscd enabled to minimise DNS resolution delays])
 | 
						    [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,
 | 
					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)
 | 
						      no)
 | 
				
			||||||
if test x"$rdns__enabled" = x"yes"; then
 | 
					if test x"$fdns__enabled" = x"yes"; then
 | 
				
			||||||
   AC_DEFINE(RDNS_ENABLE)
 | 
					   AC_DEFINE(FDNS_ENABLE)
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Let user decide whether he wants support for manpages
 | 
					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.:
 | 
					a specific target domain/host, e.g.:
 | 
				
			||||||
`upstream http 0.0.0.0:0 ".adserver.com"`
 | 
					`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>
 | 
					=item B<MaxClients>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Tinyproxy creates one thread for each connected client.
 | 
					Tinyproxy creates one thread for each connected client.
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
#include "hostspec.h"
 | 
					#include "hostspec.h"
 | 
				
			||||||
#include "heap.h"
 | 
					#include "heap.h"
 | 
				
			||||||
#include "network.h"
 | 
					#include "network.h"
 | 
				
			||||||
#ifdef RDNS_ENABLE
 | 
					#ifdef FDNS_ENABLE
 | 
				
			||||||
#include "log.h"
 | 
					#include "log.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -162,8 +162,8 @@ static int numeric_match(const uint8_t addr[], const struct hostspec *h)
 | 
				
			|||||||
	return 1;
 | 
						return 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef RDNS_ENABLE
 | 
					#ifdef FDNS_ENABLE
 | 
				
			||||||
static int reverse_dns_numeric_match(const char *ip, const struct hostspec *h)
 | 
					static int dns_numeric_match(const char *ip, const struct hostspec *h)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int ret;
 | 
						int ret;
 | 
				
			||||||
	struct addrinfo *res, *ressave;
 | 
						struct addrinfo *res, *ressave;
 | 
				
			||||||
@ -210,8 +210,8 @@ int hostspec_match(const char *ip, const struct hostspec *h) {
 | 
				
			|||||||
		if(is_numeric_addr) return 0;
 | 
							if(is_numeric_addr) return 0;
 | 
				
			||||||
		return string_match (ip, h->address.string);
 | 
							return string_match (ip, h->address.string);
 | 
				
			||||||
	case HST_NUMERIC:
 | 
						case HST_NUMERIC:
 | 
				
			||||||
#ifdef RDNS_ENABLE
 | 
					#ifdef FDNS_ENABLE
 | 
				
			||||||
		if(!is_numeric_addr) return reverse_dns_numeric_match(ip, h);
 | 
							if(!is_numeric_addr) return dns_numeric_match(ip, h);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		return numeric_match (numeric_addr, h);
 | 
							return numeric_match (numeric_addr, h);
 | 
				
			||||||
	case HST_NONE:
 | 
						case HST_NONE:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user