aboutsummaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-19 16:33:29 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-19 16:33:58 +0000
commit81f5664bc7684e8bc4bf89cde4a0a32a1ba6a75a (patch)
treebecd215d6ad3ecbf3dc5d54c67d1dc881194c82b /src/controller.c
parentb8de1be8f86fcc1f264beef615f0ddb15ab02467 (diff)
downloadrspamd-81f5664bc7684e8bc4bf89cde4a0a32a1ba6a75a.tar.gz
rspamd-81f5664bc7684e8bc4bf89cde4a0a32a1ba6a75a.zip
[Minor] Correctly set is_enable for permitted networks
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/controller.c b/src/controller.c
index 42d7bbb03..1eeab1fc4 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -461,11 +461,15 @@ rspamd_controller_check_password (struct rspamd_http_connection_entry *entry,
ret = rspamd_controller_check_forwarded (session, msg, ctx);
if (ret == 1) {
+ session->is_enable = TRUE;
+
return TRUE;
}
else if (ret == 0) {
/* No forwarded found */
msg_info_session ("allow unauthorized connection from a unix socket");
+ session->is_enable = TRUE;
+
return TRUE;
}
}
@@ -475,12 +479,16 @@ rspamd_controller_check_password (struct rspamd_http_connection_entry *entry,
ret = rspamd_controller_check_forwarded (session, msg, ctx);
if (ret == 1) {
+ session->is_enable = TRUE;
+
return TRUE;
}
else if (ret == 0) {
/* No forwarded found */
msg_info_session ("allow unauthorized connection from a trusted IP %s",
rspamd_inet_address_to_string (session->from_addr));
+ session->is_enable = TRUE;
+
return TRUE;
}
}
@@ -509,6 +517,7 @@ rspamd_controller_check_password (struct rspamd_http_connection_entry *entry,
return TRUE;
}
}
+
msg_info_session ("absent password has been specified");
ret = FALSE;
}