summaryrefslogtreecommitdiff
path: root/scripts/firewall/vyatta-show-firewall.pl
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-02-05 18:29:39 -0800
committerMohit Mehta <mohit.mehta@vyatta.com>2009-02-05 18:29:39 -0800
commit24631daaf1d68ebd1c8ce7973dccb8f1a89a1d6e (patch)
treeb18e2714cf56e5dcbc26d61fe6711962808de5a1 /scripts/firewall/vyatta-show-firewall.pl
parentb70edadeac1f18f9887037c1772a2f88a4420027 (diff)
downloadvyatta-op-firewall-24631daaf1d68ebd1c8ce7973dccb8f1a89a1d6e.tar.gz
vyatta-op-firewall-24631daaf1d68ebd1c8ce7973dccb8f1a89a1d6e.zip
add the following commands
'show firewall detail' 'show firewall statistics' 'clear firewall modify <fw-modify> counters' 'clear firewall modify <fw-modify> rule <rule-num> counters' allow show command on rule 1025 for any chain
Diffstat (limited to 'scripts/firewall/vyatta-show-firewall.pl')
-rwxr-xr-xscripts/firewall/vyatta-show-firewall.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/firewall/vyatta-show-firewall.pl b/scripts/firewall/vyatta-show-firewall.pl
index 2de9061..f103dfc 100755
--- a/scripts/firewall/vyatta-show-firewall.pl
+++ b/scripts/firewall/vyatta-show-firewall.pl
@@ -142,7 +142,7 @@ sub show_chain($$$) {
$rule->outputXml($fh);
print $fh " </row>\n";
}
- if (!defined($rule_num)) {
+ if (!defined($rule_num) || ($rule_num == 1025)) {
# dummy rule
print $fh " <row>\n";
print $fh " <rule_number>1025</rule_number>\n";
@@ -219,7 +219,7 @@ if ($tree_name eq "all") {
#validate rule-num for given chain
$config->setLevel("firewall $tree $chain_name rule");
my @rules = $config->listOrigNodes();
- if (!(scalar(grep(/^$rule_num$/, @rules)) > 0)) {
+ if (!((scalar(grep(/^$rule_num$/, @rules)) > 0) || ($rule_num == 1025))) {
print "Invalid rule $rule_num under firewall instance [$chain_name] \n";
exit 1;
}