summaryrefslogtreecommitdiff
path: root/templates-op
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2010-02-02 16:39:50 -0800
committerMohit Mehta <mohit.mehta@vyatta.com>2010-02-02 16:39:50 -0800
commitf2cfa4bbdf4f68f0e4c527da1b2188160792c870 (patch)
tree062b8deadd2a829210eaf53f7856f34386df926b /templates-op
parentad8c4bbebef0fb038d2a7ac68077a122ad994d68 (diff)
downloadvyatta-nat-f2cfa4bbdf4f68f0e4c527da1b2188160792c870.tar.gz
vyatta-nat-f2cfa4bbdf4f68f0e4c527da1b2188160792c870.zip
partial fix for bug 4115 'clear nat translations' does not clear nat translations
* added op-mode commands to clear counters for NAT rules clear nat counters # clear counters for all NAT rules clear nat counters rule <rule-num> # clear counters for a specific NAT rule
Diffstat (limited to 'templates-op')
-rw-r--r--templates-op/clear/nat/counters/node.def2
-rw-r--r--templates-op/clear/nat/counters/rule/node.def1
-rw-r--r--templates-op/clear/nat/counters/rule/node.tag/node.def3
3 files changed, 5 insertions, 1 deletions
diff --git a/templates-op/clear/nat/counters/node.def b/templates-op/clear/nat/counters/node.def
index acd6adb..3327eda 100644
--- a/templates-op/clear/nat/counters/node.def
+++ b/templates-op/clear/nat/counters/node.def
@@ -1,2 +1,2 @@
help: Clear NAT counters
-run: sudo /sbin/iptables -Z -t nat
+run: /opt/vyatta/sbin/vyatta-clear-nat-counters.pl --clirule=all
diff --git a/templates-op/clear/nat/counters/rule/node.def b/templates-op/clear/nat/counters/rule/node.def
new file mode 100644
index 0000000..806ad0a
--- /dev/null
+++ b/templates-op/clear/nat/counters/rule/node.def
@@ -0,0 +1 @@
+help: Clear counters for a specific NAT rule
diff --git a/templates-op/clear/nat/counters/rule/node.tag/node.def b/templates-op/clear/nat/counters/rule/node.tag/node.def
new file mode 100644
index 0000000..2d1b4a9
--- /dev/null
+++ b/templates-op/clear/nat/counters/rule/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Clear counters for a specific NAT rule
+allowed: ls /opt/vyatta/config/active/service/nat/rule/ 2>/dev/null
+run: /opt/vyatta/sbin/vyatta-clear-nat-counters.pl --clirule="$5"