summaryrefslogtreecommitdiffstats
path: root/src/ragel/smtp_ip.rl
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-14 16:36:20 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-14 16:36:20 +0100
commit7e6126e0169e6397d1e9e989433f590398d20fd8 (patch)
tree691986e20bf64a560ce19be6ee77eca154c22189 /src/ragel/smtp_ip.rl
parente1955662ec5a6d1b3b6b3d939d7d9be9346aa87d (diff)
downloadrspamd-7e6126e0169e6397d1e9e989433f590398d20fd8.tar.gz
rspamd-7e6126e0169e6397d1e9e989433f590398d20fd8.zip
[Feature] Implement ragel parser for received headers
Diffstat (limited to 'src/ragel/smtp_ip.rl')
-rw-r--r--src/ragel/smtp_ip.rl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ragel/smtp_ip.rl b/src/ragel/smtp_ip.rl
index b6b0080f3..b060b750a 100644
--- a/src/ragel/smtp_ip.rl
+++ b/src/ragel/smtp_ip.rl
@@ -5,7 +5,7 @@
# Source: https://tools.ietf.org/html/rfc5321#section-4.1.3
Snum = digit{1,3};
- IPv4_address_literal = Snum ("." Snum){3};
+ IPv4_address_literal = (Snum ("." Snum){3}) >IP4_start %IP4_end;
IPv6_hex = xdigit{1,4};
IPv6_full = IPv6_hex (":" IPv6_hex){7};
IPv6_comp = (IPv6_hex (":" IPv6_hex){0,5})? "::"
@@ -15,5 +15,5 @@
(IPv6_hex (":" IPv6_hex){0,3} ":")?
IPv4_address_literal;
IPv6_addr = IPv6_full | IPv6_comp | IPv6v4_full | IPv6v4_comp;
- IPv6_address_literal = "IPv6:" IPv6_addr;
+ IPv6_address_literal = "IPv6:" (IPv6_addr >IP6_start %IP6_end);
}%% \ No newline at end of file