]> git.ipfire.org Git - thirdparty/nftables.git/commit
nft: scanner: fixed problem with ipv6 address
authorAna Rey <anarey@gmail.com>
Wed, 15 Jan 2014 07:42:28 +0000 (07:42 +0000)
committerPatrick McHardy <kaber@trash.net>
Wed, 15 Jan 2014 07:42:28 +0000 (07:42 +0000)
commit6a69a383143da57143fe42f786adfd1e804dd784
treeb5b65633c7193177705af2ee0634b7457bc666e9
parent25e195a561854f983c0696c7fe8c4a65bec7475b
nft: scanner: fixed problem with ipv6 address

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>
Signed-off-by: Patrick McHardy <kaber@trash.net>
src/scanner.l