From 4f69c3181e60be9a7fa6f8d4e90f3eed080d84bd Mon Sep 17 00:00:00 2001 From: Gaurav Sinha Date: Mon, 19 Nov 2012 18:06:28 -0800 Subject: Fix rc usage as per ispet_delete and other commands (cherry picked from commit caae72ccbf2c7f77c637cc51096546404ea8c837) --- lib/Vyatta/IpTables/IpSet.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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 { -- cgit v1.2.3