diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-02-05 18:29:39 -0800 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-02-05 18:29:39 -0800 |
commit | 24631daaf1d68ebd1c8ce7973dccb8f1a89a1d6e (patch) | |
tree | b18e2714cf56e5dcbc26d61fe6711962808de5a1 /scripts/firewall/vyatta-show-firewall.pl | |
parent | b70edadeac1f18f9887037c1772a2f88a4420027 (diff) | |
download | vyatta-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-x | scripts/firewall/vyatta-show-firewall.pl | 4 |
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; } |