summaryrefslogtreecommitdiffstats
path: root/src/read_config_lex.l
diff options
context:
space:
mode:
authorJames Guthrie <jag@open.ch>2013-03-20 15:41:56 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2013-03-20 15:50:10 +0100
commit02fd8b1fef9caf1da74e4e0d5ef3c16b2e4d37d7 (patch)
treecf057925e697691e6e1ba24d4891403ede5c4a45 /src/read_config_lex.l
parent0237147701853ba4bb1f626a1315c5cc4fd5f378 (diff)
conntrackd: fix parsing of non-abbreviated IPv6 address in config file
Both representations of this example IPv6 address should be accepted: fe80::1 fe80:0:0:0:0:0:0:1 This patch fixes the lexical parser for non-abbreviated version, which was not working. Signed-off-by: James Guthrie <jag@open.ch> Signed-off-by: Roman Hoog Antink <rha@open.ch> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/read_config_lex.l')
-rw-r--r--src/read_config_lex.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/read_config_lex.l b/src/read_config_lex.l
index bec2d81..b4d11d4 100644
--- a/src/read_config_lex.l
+++ b/src/read_config_lex.l
@@ -44,8 +44,8 @@ ip4 {ip4_part}\.{ip4_part}\.{ip4_part}\.{ip4_part}{ip4_cidr}?
hex_255 [0-9a-fA-F]{1,4}
ip6_cidr \/[0-1]*[0-9]*[0-9]+
ip6_part {hex_255}":"?
-ip6_form1 {ip6_part}{0,16}"::"{ip6_part}{0,16}
-ip6_form2 ({hex_255}":"){16}{hex_255}
+ip6_form1 {ip6_part}{0,7}"::"{ip6_part}{0,7}
+ip6_form2 ({hex_255}":"){0,7}{hex_255}
ip6 {ip6_form1}{ip6_cidr}?|{ip6_form2}{ip6_cidr}?
string [a-zA-Z][a-zA-Z0-9\.\-]*
persistent [P|p][E|e][R|r][S|s][I|i][S|s][T|t][E|e][N|n][T|T]