Mercurial > dovecot > core-2.2
comparison 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 |
comparison
equal
deleted
inserted
replaced
14158:fb972ad3213d | 14159:98d696965c91 |
---|---|
1438 | 1438 |
1439 static bool | 1439 static bool |
1440 auth_request_proxy_ip_is_self(struct auth_request *request, | 1440 auth_request_proxy_ip_is_self(struct auth_request *request, |
1441 const struct ip_addr *ip) | 1441 const struct ip_addr *ip) |
1442 { | 1442 { |
1443 return net_ip_compare(ip, &request->local_ip); | 1443 unsigned int i; |
1444 | |
1445 if (net_ip_compare(ip, &request->local_ip)) | |
1446 return TRUE; | |
1447 | |
1448 for (i = 0; request->set->proxy_self_ips[i].family != 0; i++) { | |
1449 if (net_ip_compare(ip, &request->set->proxy_self_ips[i])) | |
1450 return TRUE; | |
1451 } | |
1452 return FALSE; | |
1444 } | 1453 } |
1445 | 1454 |
1446 static void auth_request_proxy_finish_ip(struct auth_request *request) | 1455 static void auth_request_proxy_finish_ip(struct auth_request *request) |
1447 { | 1456 { |
1448 if (!request->proxy_maybe) { | 1457 if (!request->proxy_maybe) { |