aboutsummaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-28 13:37:22 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-28 13:37:22 +0100
commit04127efebacaaa088668198cdbe52f933367b731 (patch)
tree5e19bd17ac25d675666f53b19f746681a57e89da /src/controller.c
parent8e5517a62b981fedc9e42d1323b066fadf086f1a (diff)
downloadrspamd-04127efebacaaa088668198cdbe52f933367b731.tar.gz
rspamd-04127efebacaaa088668198cdbe52f933367b731.zip
[Fix] Distinguish remote and local addrs parsing
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/controller.c b/src/controller.c
index 474e7ec92..27c6d18cc 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -434,7 +434,8 @@ rspamd_controller_check_forwarded (struct rspamd_controller_session *session,
comma = hdr->begin;
}
if (rspamd_parse_inet_address (&addr, comma,
- (hdr->begin + hdr->len) - comma)) {
+ (hdr->begin + hdr->len) - comma,
+ RSPAMD_INET_ADDRESS_PARSE_NO_UNIX)) {
/* We have addr now, so check if it is still trusted */
if (ctx->secure_map &&
rspamd_match_radix_map_addr (ctx->secure_map, addr) != NULL) {
@@ -463,7 +464,8 @@ rspamd_controller_check_forwarded (struct rspamd_controller_session *session,
hdr = rspamd_http_message_find_header (msg, alt_hdr_name);
if (hdr) {
- if (rspamd_parse_inet_address (&addr, hdr->begin, hdr->len)) {
+ if (rspamd_parse_inet_address (&addr, hdr->begin, hdr->len,
+ RSPAMD_INET_ADDRESS_PARSE_NO_UNIX)) {
/* We have addr now, so check if it is still trusted */
if (ctx->secure_map &&
rspamd_match_radix_map_addr (ctx->secure_map, addr) != NULL) {