aboutsummaryrefslogtreecommitdiffstats
path: root/src/ragel/smtp_ip.rl
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-02 11:59:38 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-02 12:00:23 +0100
commit3a8236c9344d6c757760a785510315d851bcbe62 (patch)
treebe97b46a8eedc63d43930c3bfd3d235cdf8318be /src/ragel/smtp_ip.rl
parent7243cd2f76e3c691b555770090a0cade43ada32b (diff)
downloadrspamd-3a8236c9344d6c757760a785510315d851bcbe62.tar.gz
rspamd-3a8236c9344d6c757760a785510315d851bcbe62.zip
[Fix] Fix parsing of non-RFC compatible Exim received
Issue: #1575
Diffstat (limited to 'src/ragel/smtp_ip.rl')
-rw-r--r--src/ragel/smtp_ip.rl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ragel/smtp_ip.rl b/src/ragel/smtp_ip.rl
index dae90a096..cd9bec64f 100644
--- a/src/ragel/smtp_ip.rl
+++ b/src/ragel/smtp_ip.rl
@@ -5,7 +5,8 @@
# Source: https://tools.ietf.org/html/rfc5321#section-4.1.3
Snum = digit{1,3};
- IPv4_address_literal = (Snum ("." Snum){3}) >IP4_start %IP4_end;
+ IPv4_addr = (Snum ("." Snum){3});
+ IPv4_address_literal = IPv4_addr >IP4_start %IP4_end;
IPv6_hex = xdigit{1,4};
IPv6_full = IPv6_hex (":" IPv6_hex){7};
IPv6_comp = (IPv6_hex (":" IPv6_hex){0,5})? "::"
@@ -14,6 +15,7 @@
IPv6v4_comp = (IPv6_hex (":" IPv6_hex){0,3})? "::"
(IPv6_hex (":" IPv6_hex){0,3} ":")?
IPv4_address_literal;
- IPv6_addr = IPv6_full | IPv6_comp | IPv6v4_full | IPv6v4_comp;
+ IPv6_simple = IPv6_full | IPv6_comp;
+ IPv6_addr = IPv6_simple | IPv6v4_full | IPv6v4_comp;
IPv6_address_literal = "IPv6:" %IP6_start IPv6_addr %IP6_end;
}%% \ No newline at end of file