Mercurial > dovecot > core-2.2
diff src/auth/auth-request.c @ 14159:98d696965c91
auth: Added auth_proxy_self setting to specify IPs that are considered as "self" for proxy_maybe.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 25 Feb 2012 05:42:05 +0200 |
parents | 8e2f395cf86c |
children | 716769cfbb1d |
line wrap: on
line diff
--- a/src/auth/auth-request.c Sat Feb 25 05:13:39 2012 +0200 +++ b/src/auth/auth-request.c Sat Feb 25 05:42:05 2012 +0200 @@ -1440,7 +1440,16 @@ auth_request_proxy_ip_is_self(struct auth_request *request, const struct ip_addr *ip) { - return net_ip_compare(ip, &request->local_ip); + unsigned int i; + + if (net_ip_compare(ip, &request->local_ip)) + return TRUE; + + for (i = 0; request->set->proxy_self_ips[i].family != 0; i++) { + if (net_ip_compare(ip, &request->set->proxy_self_ips[i])) + return TRUE; + } + return FALSE; } static void auth_request_proxy_finish_ip(struct auth_request *request)