]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
scanner: Support rfc4291 IPv4-compatible addresses
authorPhil Sutter <phil@nwl.cc>
Sat, 5 May 2018 12:44:53 +0000 (14:44 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 6 May 2018 20:56:23 +0000 (22:56 +0200)
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>
src/scanner.l

index 5f21bfd7e5e1fcda10da8611bf22170c8e35515d..70366d19303512ab45d3ffded457c9cb66055a1e 100644 (file)
@@ -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})