summaryrefslogtreecommitdiff
path: root/scripts/firewall/vyatta-clear-firewall
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-02-06 17:54:31 -0800
committerMohit Mehta <mohit.mehta@vyatta.com>2009-02-06 17:54:31 -0800
commit611ec63a17a19a9b7535b9e5076532420fe23d5d (patch)
treee8e07cc2b59433cc4ee6643e31178b8388387e71 /scripts/firewall/vyatta-clear-firewall
parent687a73aa9bd81c1ab4a7a5de7bd0ce32305481f9 (diff)
downloadvyatta-op-firewall-611ec63a17a19a9b7535b9e5076532420fe23d5d.tar.gz
vyatta-op-firewall-611ec63a17a19a9b7535b9e5076532420fe23d5d.zip
add clear counter commands for ipv6 firewall chain/chain-rule
Diffstat (limited to 'scripts/firewall/vyatta-clear-firewall')
-rw-r--r--scripts/firewall/vyatta-clear-firewall10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/firewall/vyatta-clear-firewall b/scripts/firewall/vyatta-clear-firewall
index ae48970..46f6b04 100644
--- a/scripts/firewall/vyatta-clear-firewall
+++ b/scripts/firewall/vyatta-clear-firewall
@@ -74,16 +74,14 @@ iptables_cmd=$1
table_name=$2
chain_name=$3
rule_num=$4
+ip_version="IPv4"
+cli_tree="name"
-if [[ '6' =~ $iptables_cmd ]]; then
+if [[ '/sbin/ip6tables' =~ $iptables_cmd ]]; then
ip_version="IPv6"
-else
- ip_version="IPv4"
fi
-if [[ 'filter' =~ $table_name ]]; then
- cli_tree="name"
-else
+if [[ 'mangle' =~ $table_name ]]; then
cli_tree="modify"
fi