summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Sinha <gaurav.sinha@vyatta.com>2012-11-19 18:06:28 -0800
committerGaurav Sinha <gaurav.sinha@vyatta.com>2012-11-20 10:22:12 -0800
commit4f69c3181e60be9a7fa6f8d4e90f3eed080d84bd (patch)
tree8b60bb4ada9d35f81645bc92c9a241b4a98b617b
parent5c9af71090e230bcfe2fe42d176520f04adf5faf (diff)
downloadvyatta-cfg-firewall-4f69c3181e60be9a7fa6f8d4e90f3eed080d84bd.tar.gz
vyatta-cfg-firewall-4f69c3181e60be9a7fa6f8d4e90f3eed080d84bd.zip
Fix rc usage as per ispet_delete and other commands
(cherry picked from commit caae72ccbf2c7f77c637cc51096546404ea8c837)
-rwxr-xr-xlib/Vyatta/IpTables/IpSet.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Vyatta/IpTables/IpSet.pm b/lib/Vyatta/IpTables/IpSet.pm
index 729c58e..e64a5ff 100755
--- a/lib/Vyatta/IpTables/IpSet.pm
+++ b/lib/Vyatta/IpTables/IpSet.pm
@@ -280,7 +280,9 @@ sub reset_ipset {
} else {
$self->reset_ipset_named();
}
- $self->run_cmd($unlockcmd);
+ my $rc = $self->run_cmd($unlockcmd);
+ return "Error: call to ipset failed [$rc]" if $rc;
+ return; # undef
}
sub delete {