summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsusheela <susheela.vaidya@vyatta.com>2012-10-06 14:57:20 -0700
committersusheela <susheela.vaidya@vyatta.com>2012-10-06 14:57:20 -0700
commit5df406f84ec7e1567d813e7b0d1e264a12e3cd06 (patch)
tree8d4c16cdd8c15f2604d62ad5fd32f440ba9041a4
parentdc8309dfb4ad12a5a1654952a2058db2850108d5 (diff)
downloadvyatta-op-firewall-5df406f84ec7e1567d813e7b0d1e264a12e3cd06.tar.gz
vyatta-op-firewall-5df406f84ec7e1567d813e7b0d1e264a12e3cd06.zip
PBR op commands: a clean up and fixes for 8349, 8334
-rw-r--r--scripts/firewall/vyatta-clear-firewall10
-rwxr-xr-xtemplates/clear/policy/ipv6-route/node.def2
-rwxr-xr-xtemplates/clear/policy/ipv6-route/node.tag/node.def2
-rwxr-xr-xtemplates/clear/policy/route/node.def2
-rw-r--r--templates/clear/policy/route/node.tag/counters/node.def2
-rwxr-xr-xtemplates/clear/policy/route/node.tag/node.def2
-rw-r--r--templates/show/policy/ipv6-route/node.def2
-rw-r--r--templates/show/policy/ipv6-route/node.tag/node.def2
-rw-r--r--templates/show/policy/ipv6-route/node.tag/rule/node.def2
-rw-r--r--templates/show/policy/ipv6-route/node.tag/rule/node.tag/node.def2
-rw-r--r--templates/show/policy/ipv6-route/node.tag/statistics/node.def2
-rw-r--r--templates/show/policy/ipv6-route/statistics/node.def2
-rw-r--r--templates/show/policy/route/node.def2
-rw-r--r--templates/show/policy/route/node.tag/node.def2
-rw-r--r--templates/show/policy/route/node.tag/rule/node.def2
-rw-r--r--templates/show/policy/route/node.tag/rule/node.tag/node.def2
-rw-r--r--templates/show/policy/route/node.tag/statistics/node.def2
-rw-r--r--templates/show/policy/route/statistics/node.def2
18 files changed, 23 insertions, 21 deletions
diff --git a/scripts/firewall/vyatta-clear-firewall b/scripts/firewall/vyatta-clear-firewall
index 46f6b04..0e217e5 100644
--- a/scripts/firewall/vyatta-clear-firewall
+++ b/scripts/firewall/vyatta-clear-firewall
@@ -33,7 +33,7 @@ clear_chain() {
sudo $iptables_cmd -t $table_name -Z $chain_name 2>/dev/null
result=`echo $?`
if [ $result != 0 ]; then
- echo Invalid $ip_version firewall $cli_tree chain \'$chain_name\'
+ echo Invalid $ip_version $cli_root $cli_tree instance \'$chain_name\'
exit 1
fi
}
@@ -42,7 +42,7 @@ clear_chain_rule() {
result=`sudo $iptables_cmd -t $table_name -L $chain_name 2>/dev/null`
result=`echo $?`
if [ $result != 0 ]; then
- echo Invalid $ip_version firewall $cli_tree chain \'$chain_name\'
+ echo Invalid $ip_version $cli_root $cli_tree instance \'$chain_name\'
exit 1
else
iptables_rule_num=( `sudo $iptables_cmd -t $table_name -L $chain_name \
@@ -55,7 +55,7 @@ clear_chain_rule() {
let i++
done
else
- echo No \'rule $rule_num\' under $ip_version firewall $cli_tree chain \'$chain_name\'
+ echo No \'rule $rule_num\' under $ip_version $cli_root $cli_tree instance \'$chain_name\'
exit 1
fi
fi
@@ -76,13 +76,15 @@ chain_name=$3
rule_num=$4
ip_version="IPv4"
cli_tree="name"
+cli_root="firewall"
if [[ '/sbin/ip6tables' =~ $iptables_cmd ]]; then
ip_version="IPv6"
fi
if [[ 'mangle' =~ $table_name ]]; then
- cli_tree="modify"
+ cli_root="policy"
+ cli_tree="route"
fi
if [ -n "$rule_num" ]; then
diff --git a/templates/clear/policy/ipv6-route/node.def b/templates/clear/policy/ipv6-route/node.def
index ef1851f..f4d5e78 100755
--- a/templates/clear/policy/ipv6-route/node.def
+++ b/templates/clear/policy/ipv6-route/node.def
@@ -1 +1 @@
-help: Clear policy statistics for chain
+help: Clear policy statistics for a given policy route
diff --git a/templates/clear/policy/ipv6-route/node.tag/node.def b/templates/clear/policy/ipv6-route/node.tag/node.def
index b01a78f..c201eca 100755
--- a/templates/clear/policy/ipv6-route/node.tag/node.def
+++ b/templates/clear/policy/ipv6-route/node.tag/node.def
@@ -1,4 +1,4 @@
-help: Clear firewall rules for a given chain
+help: Clear policy rules for a given policy route
allowed: local -a vals
eval "vals=($(cli-shell-api listActiveNodes policy ipv6-route))"
echo -n ${vals[@]}
diff --git a/templates/clear/policy/route/node.def b/templates/clear/policy/route/node.def
index ef1851f..f4d5e78 100755
--- a/templates/clear/policy/route/node.def
+++ b/templates/clear/policy/route/node.def
@@ -1 +1 @@
-help: Clear policy statistics for chain
+help: Clear policy statistics for a given policy route
diff --git a/templates/clear/policy/route/node.tag/counters/node.def b/templates/clear/policy/route/node.tag/counters/node.def
index e47bcdc..ec36a2d 100644
--- a/templates/clear/policy/route/node.tag/counters/node.def
+++ b/templates/clear/policy/route/node.tag/counters/node.def
@@ -1,2 +1,2 @@
-help: Clear firewall counters
+help: Clear policy counters
run: /opt/vyatta/bin/vyatta-clear-firewall "/sbin/iptables" "mangle" "$4"
diff --git a/templates/clear/policy/route/node.tag/node.def b/templates/clear/policy/route/node.tag/node.def
index e54b196..55d2657 100755
--- a/templates/clear/policy/route/node.tag/node.def
+++ b/templates/clear/policy/route/node.tag/node.def
@@ -1,4 +1,4 @@
-help: Clear policy rules for a given chain
+help: Clear policy rules for a given policy route
allowed: local -a vals
eval "vals=($(cli-shell-api listActiveNodes policy route))"
echo -n ${vals[@]}
diff --git a/templates/show/policy/ipv6-route/node.def b/templates/show/policy/ipv6-route/node.def
index 4aee1ea..4ae2638 100644
--- a/templates/show/policy/ipv6-route/node.def
+++ b/templates/show/policy/ipv6-route/node.def
@@ -1,2 +1,2 @@
-help: Show IPv6 firewall modify chains
+help: Show IPv6 policy route information
run: ${vyatta_bindir}/vyatta-show-firewall.pl "$3_all" /opt/vyatta/share/xsl/show_firewall_detail.xsl
diff --git a/templates/show/policy/ipv6-route/node.tag/node.def b/templates/show/policy/ipv6-route/node.tag/node.def
index 60f872b..4442520 100644
--- a/templates/show/policy/ipv6-route/node.tag/node.def
+++ b/templates/show/policy/ipv6-route/node.tag/node.def
@@ -1,4 +1,4 @@
-help: Show rules for given IPv6 firewall modify chain
+help: Show rules for given IPv6 policy route
allowed: local -a vals
eval "vals=($(cli-shell-api listActiveNodes firewall ipv6-modify))"
diff --git a/templates/show/policy/ipv6-route/node.tag/rule/node.def b/templates/show/policy/ipv6-route/node.tag/rule/node.def
index b4face1..d590ff0 100644
--- a/templates/show/policy/ipv6-route/node.tag/rule/node.def
+++ b/templates/show/policy/ipv6-route/node.tag/rule/node.def
@@ -1 +1 @@
-help: Show summary of IPv6 firewall modify rules
+help: Show summary of IPv6 policy rules
diff --git a/templates/show/policy/ipv6-route/node.tag/rule/node.tag/node.def b/templates/show/policy/ipv6-route/node.tag/rule/node.tag/node.def
index fa7b4cb..4c78672 100644
--- a/templates/show/policy/ipv6-route/node.tag/rule/node.tag/node.def
+++ b/templates/show/policy/ipv6-route/node.tag/rule/node.tag/node.def
@@ -1,4 +1,4 @@
-help: Show summary of IPv6 firewall modify rules
+help: Show summary of IPv6 policy rule
allowed: local -a vals
eval "vals=($(cli-shell-api listActiveNodes \
diff --git a/templates/show/policy/ipv6-route/node.tag/statistics/node.def b/templates/show/policy/ipv6-route/node.tag/statistics/node.def
index 707efa3..cb643c0 100644
--- a/templates/show/policy/ipv6-route/node.tag/statistics/node.def
+++ b/templates/show/policy/ipv6-route/node.tag/statistics/node.def
@@ -1,2 +1,2 @@
-help: Show IPv6 firewall modify counter information
+help: Show IPv6 policy counter information
run: ${vyatta_bindir}/vyatta-show-firewall.pl "$3_$4" /opt/vyatta/share/xsl/show_firewall_statistics.xsl
diff --git a/templates/show/policy/ipv6-route/statistics/node.def b/templates/show/policy/ipv6-route/statistics/node.def
index ae89dec..ac6a8b9 100644
--- a/templates/show/policy/ipv6-route/statistics/node.def
+++ b/templates/show/policy/ipv6-route/statistics/node.def
@@ -1,2 +1,2 @@
-help: Show firewall counter information
+help: Show IPv6 policy counter information
run: ${vyatta_bindir}/vyatta-show-firewall.pl "$3_all" /opt/vyatta/share/xsl/show_firewall_statistics.xsl
diff --git a/templates/show/policy/route/node.def b/templates/show/policy/route/node.def
index 8a16e04..1edb74a 100644
--- a/templates/show/policy/route/node.def
+++ b/templates/show/policy/route/node.def
@@ -1,2 +1,2 @@
-help: Show IPv4 firewall modify chains
+help: Show IPv4 policy route information
run: ${vyatta_bindir}/vyatta-show-firewall.pl "$3_all" /opt/vyatta/share/xsl/show_firewall_detail.xsl
diff --git a/templates/show/policy/route/node.tag/node.def b/templates/show/policy/route/node.tag/node.def
index 096bac0..dadb0f0 100644
--- a/templates/show/policy/route/node.tag/node.def
+++ b/templates/show/policy/route/node.tag/node.def
@@ -1,4 +1,4 @@
-help: Show rules for given IPv4 firewall modify chain
+help: Show rules for given IPv4 policy route
allowed: local -a vals
eval "vals=($(cli-shell-api listActiveNodes firewall modify))"
diff --git a/templates/show/policy/route/node.tag/rule/node.def b/templates/show/policy/route/node.tag/rule/node.def
index 44a9e1a..1ab5a92 100644
--- a/templates/show/policy/route/node.tag/rule/node.def
+++ b/templates/show/policy/route/node.tag/rule/node.def
@@ -1 +1 @@
-help: Show summary of IPv4 firewall modify rules
+help: Show summary of IPv4 policy rules
diff --git a/templates/show/policy/route/node.tag/rule/node.tag/node.def b/templates/show/policy/route/node.tag/rule/node.tag/node.def
index e79461e..9ce91b2 100644
--- a/templates/show/policy/route/node.tag/rule/node.tag/node.def
+++ b/templates/show/policy/route/node.tag/rule/node.tag/node.def
@@ -1,4 +1,4 @@
-help: Show summary of IPv4 firewall modify rules
+help: Show summary of IPv4 policy rule
allowed: local -a vals
eval "vals=($(cli-shell-api listActiveNodes \
diff --git a/templates/show/policy/route/node.tag/statistics/node.def b/templates/show/policy/route/node.tag/statistics/node.def
index a96479b..2b82928 100644
--- a/templates/show/policy/route/node.tag/statistics/node.def
+++ b/templates/show/policy/route/node.tag/statistics/node.def
@@ -1,2 +1,2 @@
-help: Show IPv4 firewall modify counter information
+help: Show IPv4 policy counter information
run: ${vyatta_bindir}/vyatta-show-firewall.pl "$3_$4" /opt/vyatta/share/xsl/show_firewall_statistics.xsl
diff --git a/templates/show/policy/route/statistics/node.def b/templates/show/policy/route/statistics/node.def
index ae89dec..618ec1f 100644
--- a/templates/show/policy/route/statistics/node.def
+++ b/templates/show/policy/route/statistics/node.def
@@ -1,2 +1,2 @@
-help: Show firewall counter information
+help: Show IPv4 policy counter information
run: ${vyatta_bindir}/vyatta-show-firewall.pl "$3_all" /opt/vyatta/share/xsl/show_firewall_statistics.xsl