From 330f5df03ad589b46865ceedf2a54cf10a4225ba Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 19 Feb 2021 16:54:57 +0100 Subject: nft: Fix bitwise expression avoidance detection Byte-boundary prefix detection was too sloppy: Any data following the first zero-byte was ignored. Add a follow-up loop making sure there are no stray bits in the designated host part. Fixes: 323259001d617 ("nft: Optimize class-based IP prefix matches") Signed-off-by: Phil Sutter --- .../shell/testcases/ip6tables/0004-address-masks_0 | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 iptables/tests/shell/testcases/ip6tables/0004-address-masks_0 (limited to 'iptables/tests') diff --git a/iptables/tests/shell/testcases/ip6tables/0004-address-masks_0 b/iptables/tests/shell/testcases/ip6tables/0004-address-masks_0 new file mode 100755 index 00000000..7eb42f08 --- /dev/null +++ b/iptables/tests/shell/testcases/ip6tables/0004-address-masks_0 @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +$XT_MULTI ip6tables-restore <