Update tests which contain unsupported features in older kernels.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
#!/bin/bash
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_netdev_chain_multidevice)
+
set -e
ip link add dummy0 type dummy
#!/bin/bash
# NFT_TEST_REQUIRES(NFT_TEST_HAVE_cttimeout)
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_ctexpect)
$NFT -f /dev/stdin <<EOF || exit 1
table inet t {
# should fail: rule has no test for l4 protocol, but map has inet_service
$NFT add rule 'ip6 ip6foo c dnat to ip daddr map @y' && exit 1
+if [ "$NFT_TEST_HAVE_inet_nat" = n ]; then
+ echo "Test partially skipped due to NFT_TEST_HAVE_inet_nat=n"
+ exit 77
+fi
+
# skeleton inet
$NFT -f /dev/stdin <<EOF || exit 1
table inet inetfoo {
#!/bin/bash
# NFT_TEST_REQUIRES(NFT_TEST_HAVE_prerouting_reject)
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_inet_nat)
RULESET="table inet uni {
chain gtfo {
test $($NFT -j -e -a -f - <<< "$RULESET" |sed 's/\({"add":\)/\n\1/g' |grep '"handle"' |wc -l) -eq ${RULE_COUNT} || exit 1
fi
+if [ "$NFT_TEST_HAVE_inet_nat" = n ]; then
+ echo "Test partially skipped due to missing inet nat support."
+ exit 77
+fi
+
# Now an example from firewalld's testsuite
#
$NFT flush ruleset