[dovecot-cvs] dovecot/src/pop3-login client.c,1.50,1.51
cras at dovecot.org
cras at dovecot.org
Sat Jul 1 23:09:39 EEST 2006
Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv3701/src/pop3-login
Modified Files:
client.c
Log Message:
Removed hardcoded 127.* and ::1 IP checks. Instead just check that local IP
matches remote IP to assume the connection is secure.
Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- client.c 12 Apr 2006 07:37:30 -0000 1.50
+++ client.c 1 Jul 2006 20:09:37 -0000 1.51
@@ -304,7 +304,6 @@
const struct ip_addr *ip)
{
struct pop3_client *client;
- const char *addr;
if (max_logging_users > CLIENT_DESTROY_OLDEST_COUNT &&
hash_size(clients) >= max_logging_users) {
@@ -320,12 +319,7 @@
client->created = ioloop_time;
client->refcount = 1;
client->common.tls = ssl;
-
- addr = net_ip2addr(ip);
- client->common.secured = ssl ||
- (IPADDR_IS_V4(ip) && strncmp(addr, "127.", 4) == 0) ||
- (IPADDR_IS_V6(ip) && (strcmp(addr, "::1") == 0 ||
- strncmp(addr, "::ffff:127.", 11) == 0));
+ client->common.secured = ssl || net_ip_compare(ip, local_ip);
client->common.local_ip = *local_ip;
client->common.ip = *ip;
More information about the dovecot-cvs
mailing list