summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-09-26 16:23:19 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-04 02:13:40 +0200
commit276c452e47c5e22b3af06a051aa2908521aeba66 (patch)
tree74b2587a11d9ddc706bee1a917fc17429ad0aba9 /tests
parent14a9968a56f8b35138bab172aa7ce796f5d98e03 (diff)
netlink: remove markup json parsing code
We have better json support these days, remove libnftnl json support. While at it, remove test file for this too. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/testcases/import/vm_json_import_053
1 files changed, 0 insertions, 53 deletions
diff --git a/tests/shell/testcases/import/vm_json_import_0 b/tests/shell/testcases/import/vm_json_import_0
deleted file mode 100755
index 546ccf7a..00000000
--- a/tests/shell/testcases/import/vm_json_import_0
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-
-RULESET="table ip mangle {
- set blackhole {
- type ipv4_addr
- elements = { 192.168.1.4, 192.168.1.5 }
- }
-
- chain prerouting {
- type filter hook prerouting priority 0; policy accept;
- tcp dport { ssh, http } accept
- ip saddr @blackhole drop
- icmp type echo-request accept
- iifname \"lo\" accept
- icmp type echo-request counter packets 0 bytes 0
- ct state established,related accept
- tcp flags != syn counter packets 7 bytes 841
- ip saddr 192.168.1.100 ip daddr 192.168.1.1 counter packets 0 bytes 0
- }
-}
-table arp x {
- chain y {
- arp htype 22
- arp ptype ip
- arp operation != rrequest
- arp operation { request, reply, rrequest, rreply, inrequest, inreply, nak }
- arp hlen 33-45
- }
-}
-table bridge x {
- chain y {
- type filter hook input priority 0; policy accept;
- vlan id 4094
- vlan id 4094 vlan cfi 0
- vlan id 1 ip saddr 10.0.0.0/23 udp dport domain
- }
-}
-table ip6 x {
- chain y {
- type nat hook postrouting priority 0; policy accept;
- icmpv6 id 33-45
- ip6 daddr fe00::1-fe00::200 udp dport domain counter packets 0 bytes 0
- meta l4proto tcp masquerade to :1024
- iifname \"wlan0\" ct state established,new tcp dport vmap { ssh : drop, 222 : drop } masquerade
- tcp dport ssh ip6 daddr 1::2 ether saddr 00:0f:54:0c:11:04 accept
- ip6 daddr fe00::1-fe00::200 udp dport domain counter packets 0 bytes 0 masquerade
- }
-}"
-
-$NFT -f - <<< "$RULESET"
-RULESET_JSON=$($NFT export vm json)
-$NFT flush ruleset
-$NFT import vm json <<< "$RULESET_JSON"