• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3case $XT_MULTI in
4*xtables-nft-multi)
5	;;
6*)
7	echo skip $XT_MULTI
8	exit 0
9	;;
10esac
11
12set -e
13
14nft -f - <<EOF
15table ip filter {
16	chain a {
17		type filter hook input priority filter
18	}
19
20        chain INPUT {
21                type filter hook input priority filter
22                counter packets 218 bytes 91375 accept
23        }
24
25        chain x {
26                type filter hook input priority filter
27        }
28}
29EOF
30
31EXPECT="# Table \`filter' contains incompatible base-chains, use 'nft' tool to list them.
32-P INPUT ACCEPT
33-P FORWARD ACCEPT
34-P OUTPUT ACCEPT
35-A INPUT -j ACCEPT"
36
37diff -u -Z <(echo -e "$EXPECT") <($XT_MULTI iptables -S)
38