summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-05-05 14:44:53 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-05-06 22:56:23 +0200
commit3f82ef3d0dbf2788fd24ecb20299f99c190ea7ec (patch)
tree30e34d7f1ca552a29f2a1633d6e87fa1cc23f69a
parentd3602d721b57fe27345b69f2f761b807cd4a280d (diff)
scanner: Support rfc4291 IPv4-compatible addresses
These are defined in section 2.5.5.1. Although it is stated that they are deprecated and new implementations are not required to support them, they occur in ruleset output if an address in the form '::feed:babe' was given in input. In order to support reinsertion of that rule, we have to support those deprecated addresses as well. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/scanner.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 5f21bfd7..70366d19 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -158,10 +158,11 @@ v632 ((({hex4}:){2})((:{hex4}){1}))
v633 ((({hex4}:){3})(:))
v63 ({v630}|{v631}|{v632}|{v633})
v620 ((:)((:{hex4}){2}))
+v620_rfc4291 ((:)(:{ip4addr}))
v621 ((({hex4}:){1})((:{hex4}){1}))
v622 ((({hex4}:){2})(:))
v62_rfc4291 ((:)(:[fF]{4})(:{ip4addr}))
-v62 ({v620}|{v621}|{v622}|{v62_rfc4291})
+v62 ({v620}|{v621}|{v622}|{v62_rfc4291}|{v620_rfc4291})
v610 ((:)(:{hex4}{1}))
v611 ((({hex4}:){1})(:))
v61 ({v610}|{v611})