summaryrefslogtreecommitdiffstats
path: root/src/ragel/smtp_ip.rl
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-05 16:00:06 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-05 16:00:06 +0000
commitb8ccacc1744d1c0385449c3c9996f2fcfecfb8d8 (patch)
tree197fc36c95113b693c429df7b96c986fb17247ff /src/ragel/smtp_ip.rl
parented7ecf0d80246dc047676cfeb5f1726c678eb01b (diff)
downloadrspamd-b8ccacc1744d1c0385449c3c9996f2fcfecfb8d8.tar.gz
rspamd-b8ccacc1744d1c0385449c3c9996f2fcfecfb8d8.zip
[Project] Rework ragel machines
Diffstat (limited to 'src/ragel/smtp_ip.rl')
-rw-r--r--src/ragel/smtp_ip.rl15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ragel/smtp_ip.rl b/src/ragel/smtp_ip.rl
index cd9bec64f..ed10c95b5 100644
--- a/src/ragel/smtp_ip.rl
+++ b/src/ragel/smtp_ip.rl
@@ -3,6 +3,14 @@
# Parses IPv4/IPv6 address
# Source: https://tools.ietf.org/html/rfc5321#section-4.1.3
+ # Dependencies: none
+ # Required actions:
+ # - IP4_start
+ # - IP4_end
+ # - IP6_start
+ # - IP6_end
+ # - Domain_addr_start
+ # - Domain_addr_end
Snum = digit{1,3};
IPv4_addr = (Snum ("." Snum){3});
@@ -18,4 +26,11 @@
IPv6_simple = IPv6_full | IPv6_comp;
IPv6_addr = IPv6_simple | IPv6v4_full | IPv6v4_comp;
IPv6_address_literal = "IPv6:" %IP6_start IPv6_addr %IP6_end;
+
+ General_address_literal = Standardized_tag ":" dcontent+;
+ address_literal = "[" ( IPv4_address_literal |
+ IPv6_address_literal |
+ General_address_literal ) >Domain_addr_start %Domain_addr_end "]";
+ non_conformant_address_literal = IPv4_address_literal >Domain_addr_start %Domain_addr_end;
+
}%% \ No newline at end of file