summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-07-02 12:13:54 -0700
committerMohit Mehta <mohit.mehta@vyatta.com>2009-07-02 12:22:00 -0700
commita23019372888f2b0defb8c72fb494da6b24e0609 (patch)
tree620aa68779ebce47df662ff63691fa80b763c64c /lib
parent8f040d65de91b2d4ff08764d9408a21b5c145735 (diff)
downloadvyatta-cfg-a23019372888f2b0defb8c72fb494da6b24e0609.tar.gz
vyatta-cfg-a23019372888f2b0defb8c72fb494da6b24e0609.zip
add function to check if a firewall ruleset isActive
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/Zone.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Vyatta/Zone.pm b/lib/Vyatta/Zone.pm
index fd224b0..4b169b5 100755
--- a/lib/Vyatta/Zone.pm
+++ b/lib/Vyatta/Zone.pm
@@ -49,6 +49,12 @@ sub run_cmd {
return $error;
}
+sub is_fwruleset_active {
+ my ($value_func, $ruleset_type, $fw_ruleset) = @_;
+ my $config = new Vyatta::Config;
+ return $config->$value_func("firewall $ruleset_type $fw_ruleset");
+}
+
sub get_all_zones {
my $value_func = shift;
my $config = new Vyatta::Config;