summaryrefslogtreecommitdiffstats
path: root/iptables/tests/shell/testcases/nft-only/0003delete-with-comment_0
blob: ccb009e469076ab80e15ad1f285deabf2260036f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

set -e

[[ $XT_MULTI == *xtables-nft-multi ]] || { echo "skip $XT_MULTI"; exit 0; }

comment1="foo bar"
comment2="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

for ipt in iptables ip6tables; do
	for comment in "$comment1" "$comment2"; do
		$XT_MULTI $ipt -A INPUT -m comment --comment "$comment" -j ACCEPT
		$XT_MULTI $ipt -D INPUT -m comment --comment "$comment" -j ACCEPT
	done
done