summaryrefslogtreecommitdiff
path: root/lib/Vyatta/IpTables/Mgr.pm
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-11-29 17:26:47 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-11-29 17:26:47 -0800
commit8c42ead95f12c0c4527fc55a0ce7392757328d53 (patch)
treed4559a876f9fd7a749bcfe7e3b4dbf58c55b58f7 /lib/Vyatta/IpTables/Mgr.pm
parent8c4804927b8f2d14223648cd238a639bf6aa7237 (diff)
downloadvyatta-cfg-firewall-8c42ead95f12c0c4527fc55a0ce7392757328d53.tar.gz
vyatta-cfg-firewall-8c42ead95f12c0c4527fc55a0ce7392757328d53.zip
Fix 6442: Request to remove "Error: ipt_disable_conntrack failed to find
Don't print scary messages when trying to delete something thats not there.
Diffstat (limited to 'lib/Vyatta/IpTables/Mgr.pm')
-rwxr-xr-xlib/Vyatta/IpTables/Mgr.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Vyatta/IpTables/Mgr.pm b/lib/Vyatta/IpTables/Mgr.pm
index 5b3c9b4..d14d9c5 100755
--- a/lib/Vyatta/IpTables/Mgr.pm
+++ b/lib/Vyatta/IpTables/Mgr.pm
@@ -32,6 +32,7 @@ our @EXPORT = qw(ipt_find_chain_rule ipt_enable_conntrack
ipt_disable_conntrack count_iptables_rules
chain_referenced ipt_get_queue_target);
+my $debug = 0;
sub ipt_find_chain_rule {
my ($iptables_cmd, $table, $chain, $search) = @_;
@@ -93,8 +94,10 @@ sub ipt_disable_conntrack {
$index = ipt_find_chain_rule($iptables_cmd, 'raw',
$label, $chain);
if (! defined($index)) {
- print "Error: ipt_disable_conntrack failed to find "
- . "[$label][$chain]\n";
+ if ($debug > 0) {
+ print "Error: ipt_disable_conntrack failed to find "
+ . "[$label][$chain]\n";
+ }
return 1;
}
system("sudo $iptables_cmd -t raw -D $label $index");