* [PATCH] nft: scanner: fixed problem with ipv6 address
@ 2014-01-14 19:25 Ana Rey
2014-01-15 7:43 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Ana Rey @ 2014-01-14 19:25 UTC (permalink / raw)
To: netfilter-devel; +Cc: Ana Rey
There is a problem with the follow ipv6 address combination:
nft add rule ip6 t_ip61 filter-input ip6 saddr ::1234:1234:1234:1234:1234:1234:1234
1234::1234:1234:1234:1234:1234:1234
1234:1234::1234:1234:1234:1234:1234
1234:1234:1234::1234:1234:1234:1234
1234:1234:1234:1234::1234:1234:1234
1234:1234:1234:1234:1234::1234:1234
::1234:1234:1234:1234:1234:1234
1234::1234:1234:1234:1234:1234
1234:1234::1234:1234:1234:1234
1234:1234:1234::1234:1234:1234
1234:1234:1234:1234::1234:1234
::1234:1234:1234:1234:1234
1234::1234:1234:1234:1234
1234:1234::1234:1234:1234
1234:1234:1234::1234:1234
::1234:1234:1234:1234
1234::1234:1234:1234
1234:1234::1234:1234
::1234:1234:1234
1234::1234:1234
The problem was in the scanner (src/scanner.l). Several brackets were missed
and the result was an incorrect interpretation.
Fix it by adding some brackets in a regular expression in src/scanner.l
Signed-off-by: Ana Rey <anarey@gmail.com>
---
src/scanner.l | 50 +++++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/src/scanner.l b/src/scanner.l
index ee71492..345b131 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -118,43 +118,43 @@ slash \/
hex4 ([[:xdigit:]]{1,4})
v680 (({hex4}:){7}{hex4})
-v670 ((:)(:{hex4}{7}))
-v671 ((({hex4}:){1})(:{hex4}{6}))
-v672 ((({hex4}:){2})(:{hex4}{5}))
-v673 ((({hex4}:){3})(:{hex4}{4}))
-v674 ((({hex4}:){4})(:{hex4}{3}))
-v675 ((({hex4}:){5})(:{hex4}{2}))
+v670 ((:)((:{hex4}){7}))
+v671 ((({hex4}:){1})((:{hex4}){6}))
+v672 ((({hex4}:){2})((:{hex4}){5}))
+v673 ((({hex4}:){3})((:{hex4}){4}))
+v674 ((({hex4}:){4})((:{hex4}){3}))
+v675 ((({hex4}:){5})((:{hex4}){2}))
v676 ((({hex4}:){6})(:{hex4}{1}))
v677 ((({hex4}:){7})(:))
v67 ({v670}|{v671}|{v672}|{v673}|{v674}|{v675}|{v676}|{v677})
-v660 ((:)(:{hex4}{6}))
-v661 ((({hex4}:){1})(:{hex4}{5}))
-v662 ((({hex4}:){2})(:{hex4}{4}))
-v663 ((({hex4}:){3})(:{hex4}{3}))
-v664 ((({hex4}:){4})(:{hex4}{2}))
-v665 ((({hex4}:){5})(:{hex4}{1}))
+v660 ((:)((:{hex4}){6}))
+v661 ((({hex4}:){1})((:{hex4}){5}))
+v662 ((({hex4}:){2})((:{hex4}){4}))
+v663 ((({hex4}:){3})((:{hex4}){3}))
+v664 ((({hex4}:){4})((:{hex4}){2}))
+v665 ((({hex4}:){5})((:{hex4}){1}))
v666 ((({hex4}:){6})(:))
v66 ({v660}|{v661}|{v662}|{v663}|{v664}|{v665}|{v666})
-v650 ((:)(:{hex4}{5}))
-v651 ((({hex4}:){1})(:{hex4}{4}))
-v652 ((({hex4}:){2})(:{hex4}{3}))
-v653 ((({hex4}:){3})(:{hex4}{2}))
+v650 ((:)((:{hex4}){5}))
+v651 ((({hex4}:){1})((:{hex4}){4}))
+v652 ((({hex4}:){2})((:{hex4}){3}))
+v653 ((({hex4}:){3})((:{hex4}){2}))
v654 ((({hex4}:){4})(:{hex4}{1}))
v655 ((({hex4}:){5})(:))
v65 ({v650}|{v651}|{v652}|{v653}|{v654}|{v655})
-v640 ((:)(:{hex4}{4}))
-v641 ((({hex4}:){1})(:{hex4}{3}))
-v642 ((({hex4}:){2})(:{hex4}{2}))
-v643 ((({hex4}:){3})(:{hex4}{1}))
+v640 ((:)((:{hex4}){4}))
+v641 ((({hex4}:){1})((:{hex4}){3}))
+v642 ((({hex4}:){2})((:{hex4}){2}))
+v643 ((({hex4}:){3})((:{hex4}){1}))
v644 ((({hex4}:){4})(:))
v64 ({v640}|{v641}|{v642}|{v643}|{v644})
-v630 ((:)(:{hex4}{3}))
-v631 ((({hex4}:){1})(:{hex4}{2}))
-v632 ((({hex4}:){2})(:{hex4}{1}))
+v630 ((:)((:{hex4}){3}))
+v631 ((({hex4}:){1})((:{hex4}){2}))
+v632 ((({hex4}:){2})((:{hex4}){1}))
v633 ((({hex4}:){3})(:))
v63 ({v630}|{v631}|{v632}|{v633})
-v620 ((:)(:{hex4}{2}))
-v621 ((({hex4}:){1})(:{hex4}{1}))
+v620 ((:)((:{hex4}){2}))
+v621 ((({hex4}:){1})((:{hex4}){1}))
v622 ((({hex4}:){2})(:))
v62 ({v620}|{v621}|{v622})
v610 ((:)(:{hex4}{1}))
--
1.8.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nft: scanner: fixed problem with ipv6 address
2014-01-14 19:25 [PATCH] nft: scanner: fixed problem with ipv6 address Ana Rey
@ 2014-01-15 7:43 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2014-01-15 7:43 UTC (permalink / raw)
To: Ana Rey; +Cc: netfilter-devel
On Tue, Jan 14, 2014 at 08:25:56PM +0100, Ana Rey wrote:
> There is a problem with the follow ipv6 address combination:
>
> nft add rule ip6 t_ip61 filter-input ip6 saddr ::1234:1234:1234:1234:1234:1234:1234
>
> 1234::1234:1234:1234:1234:1234:1234
> 1234:1234::1234:1234:1234:1234:1234
> 1234:1234:1234::1234:1234:1234:1234
> 1234:1234:1234:1234::1234:1234:1234
> 1234:1234:1234:1234:1234::1234:1234
> ::1234:1234:1234:1234:1234:1234
> 1234::1234:1234:1234:1234:1234
> 1234:1234::1234:1234:1234:1234
> 1234:1234:1234::1234:1234:1234
> 1234:1234:1234:1234::1234:1234
> ::1234:1234:1234:1234:1234
> 1234::1234:1234:1234:1234
> 1234:1234::1234:1234:1234
> 1234:1234:1234::1234:1234
> ::1234:1234:1234:1234
> 1234::1234:1234:1234
> 1234:1234::1234:1234
> ::1234:1234:1234
> 1234::1234:1234
>
> The problem was in the scanner (src/scanner.l). Several brackets were missed
> and the result was an incorrect interpretation.
>
> Fix it by adding some brackets in a regular expression in src/scanner.l
>
> Signed-off-by: Ana Rey <anarey@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-15 7:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 19:25 [PATCH] nft: scanner: fixed problem with ipv6 address Ana Rey
2014-01-15 7:43 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).