From 3e34cfa3e5ce621aadb506a93c4cc543fab0d95a Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Thu, 16 Apr 2009 17:35:25 -0700 Subject: add function to get zone default-policy remove extraneous arguments in function definition --- lib/Vyatta/Zone.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Vyatta/Zone.pm b/lib/Vyatta/Zone.pm index 17182be..ed55e42 100755 --- a/lib/Vyatta/Zone.pm +++ b/lib/Vyatta/Zone.pm @@ -74,8 +74,14 @@ sub is_local_zone { return $config->$value_func("zone-policy zone $zone_name local-zone"); } +sub get_zone_default_policy { + my ($value_func, $zone_name) = @_; + my $config = new Vyatta::Config; + return $config->$value_func("zone-policy zone $zone_name default-policy"); +} + sub rule_exists { - my ($command, $table, $tree, $chain_name, $target, $interface) = @_; + my ($command, $table, $chain_name, $target, $interface) = @_; my $cmd = "sudo $command -t $table -L " . "$chain_name -v 2>/dev/null | grep \" $target \" "; @@ -104,7 +110,7 @@ sub get_zone_chain { } sub count_iptables_rules { - my ($command, $table,$type, $chain) = @_; + my ($command, $table, $chain) = @_; my @lines = `sudo $command -t $table -L $chain -n --line`; my $cnt = 0; foreach my $line (@lines) { -- cgit v1.2.3