summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-11-27 20:07:11 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-11-27 20:46:26 +0100
commitccf154d7420c07b6e6febc1c3b8b31d2bd1adbe6 (patch)
treef197af81ce1b071b2a34e8f563a02aec3f6daa00 /extensions
parent2ed6c85f8743a83d2b302bf6bd8d16b5efa3bb14 (diff)
xtables: Don't use native nftables comments
The problem with converting libxt_comment into nftables comment is that rules change when parsing from kernel due to comment match being moved to the end of the match list. And since match ordering matters, the rule may not be found anymore when checking or deleting. Apart from that, iptables-nft didn't support multiple comments per rule anymore. This is a compatibility issue without technical reason. Leave conversion from nftables comment to libxt_comment in place so we don't break running systems during an update. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libxt_comment.t2
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/libxt_comment.t b/extensions/libxt_comment.t
index f12cd668..f0c8fb99 100644
--- a/extensions/libxt_comment.t
+++ b/extensions/libxt_comment.t
@@ -1,6 +1,8 @@
:INPUT,FORWARD,OUTPUT
-m comment;;FAIL
-m comment --comment;;FAIL
+-p tcp -m tcp --dport 22 -m comment --comment foo;=;OK
+-p tcp -m comment --comment foo -m tcp --dport 22;=;OK
#
# it fails with 256 characters
#