summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2013-06-27 18:56:38 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-06-27 19:36:24 +0200
commit8e7acbfae3017cd5f30e3b17ca16354f76b81b8a (patch)
tree88164946f76b50c96ad9a08308988e434af429de /test
parent04604b0373d907fefde0c3e13af68868f03e5d58 (diff)
src: xml: convert family values to string
This patch translates family values to display a string: * ip if AF_INET * ip6 if AF_INET6 * bridge if AF_BRIDGE * arp if 0 Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/nft-chain-xml-add.sh6
-rwxr-xr-xtest/nft-rule-xml-add.sh3
-rwxr-xr-xtest/nft-table-xml-add.sh4
3 files changed, 6 insertions, 7 deletions
diff --git a/test/nft-chain-xml-add.sh b/test/nft-chain-xml-add.sh
index fda28cb..ab50e2b 100755
--- a/test/nft-chain-xml-add.sh
+++ b/test/nft-chain-xml-add.sh
@@ -42,7 +42,7 @@ XML="<chain name=\"test1\" handle=\"100\" bytes=\"123\" packets=\"321\" version=
<use>0</use>
<hooknum>NF_INET_LOCAL_IN</hooknum>
<policy>1</policy>
- <family>2</family>
+ <family>ip</family>
</properties>
</chain>"
@@ -63,7 +63,7 @@ XML="<chain name=\"test2\" handle=\"101\" bytes=\"59\" packets=\"1\" version=\"0
<use>0</use>
<hooknum>NF_INET_POST_ROUTING</hooknum>
<policy>1</policy>
- <family>10</family>
+ <family>ip6</family>
</properties>
</chain>"
@@ -85,7 +85,7 @@ XML="<chain name=\"test3\" handle=\"102\" bytes=\"51231239\" packets=\"112312312
<use>0</use>
<hooknum>NF_INET_FORWARD</hooknum>
<policy>1</policy>
- <family>2</family>
+ <family>ip</family>
</properties>
</chain>"
diff --git a/test/nft-rule-xml-add.sh b/test/nft-rule-xml-add.sh
index 426b975..961b597 100755
--- a/test/nft-rule-xml-add.sh
+++ b/test/nft-rule-xml-add.sh
@@ -33,9 +33,8 @@ fi
[ ! -x "$NFT" ] && echo "W: nftables main binary not found but continuing anyway $NFT"
-XML="<rule family=\"2\" table=\"filter\" chain=\"INPUT\" handle=\"100\" version=\"0\">
+XML="<rule family=\"ip\" table=\"filter\" chain=\"INPUT\" handle=\"100\" version=\"0\">
<rule_flags>0</rule_flags>
- <flags>127</flags>
<compat_flags>0</compat_flags>
<compat_proto>0</compat_proto>
<expr type=\"meta\">
diff --git a/test/nft-table-xml-add.sh b/test/nft-table-xml-add.sh
index 2c55edc..30b65e1 100755
--- a/test/nft-table-xml-add.sh
+++ b/test/nft-table-xml-add.sh
@@ -40,7 +40,7 @@ fi
# This is valid
XML="<table name=\"filter_test\" version=\"0\">
<properties>
- <family>2</family>
+ <family>ip</family>
<table_flags>0</table_flags>
</properties>
</table>"
@@ -57,7 +57,7 @@ fi
# This is valid
XML="<table name=\"filter6_test\" version=\"0\">
<properties>
- <family>10</family>
+ <family>ip6</family>
<table_flags>0</table_flags>
</properties>
</table>"