changeset 19049:8f96bbd1691f

*-login: mail_max_userip_connections=0 was broken by f8ab4f979e92
author Timo Sirainen <tss@iki.fi>
date Mon, 31 Aug 2015 22:45:17 +0300
parents 7648b127ca37
children 238a34ad1ab0
files src/login-common/sasl-server.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/login-common/sasl-server.c	Mon Aug 31 22:25:57 2015 +0300
+++ b/src/login-common/sasl-server.c	Mon Aug 31 22:45:17 2015 +0300
@@ -169,7 +169,9 @@
 	if (reply != NULL && str_to_uint(reply, &conn_count) < 0)
 		i_fatal("Received invalid reply from anvil: %s", reply);
 
-	if (conn_count < set->mail_max_userip_connections)
+	/* reply=NULL if we didn't need to do anvil lookup,
+	   or if the anvil lookup failed. allow failed anvil lookups in. */
+	if (reply == NULL || conn_count < set->mail_max_userip_connections)
 		master_send_request(req);
 	else {
 		client->authenticating = FALSE;