summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-10-15 16:36:51 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-10-15 16:36:51 -0700
commitb275f106a010b1306f6d3cf5a881d769b9a712f6 (patch)
tree4a924cfcf76d5389facf564646e53dea5a31a8db /lib
parentefc63dbf61c30444342a4f7a8bed14aefdbde739 (diff)
downloadvyatta-cfg-firewall-b275f106a010b1306f6d3cf5a881d769b9a712f6.tar.gz
vyatta-cfg-firewall-b275f106a010b1306f6d3cf5a881d769b9a712f6.zip
Fix 6296: "iptables: No chain..." message when committing the firewall group configuration.
- redirect stderr
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/IpTables/Mgr.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Vyatta/IpTables/Mgr.pm b/lib/Vyatta/IpTables/Mgr.pm
index 6452540..ac0805f 100755
--- a/lib/Vyatta/IpTables/Mgr.pm
+++ b/lib/Vyatta/IpTables/Mgr.pm
@@ -118,8 +118,10 @@ sub ipt_get_queue_target {
}
sub count_iptables_rules {
- my ($command, $table, $chain) = @_;
- my @lines = `sudo $command -t $table -L $chain -n --line`;
+ my ($iptables_cmd, $table, $chain) = @_;
+
+ my $cmd = "$iptables_cmd -t $table -L $chain -n --line";
+ my @lines = `sudo $cmd 2> /dev/null`;
my $cnt = 0;
foreach my $line (@lines) {
$cnt++ if $line =~ /^\d/;