diff options
author | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-11-19 18:06:28 -0800 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-11-20 10:22:12 -0800 |
commit | 4f69c3181e60be9a7fa6f8d4e90f3eed080d84bd (patch) | |
tree | 8b60bb4ada9d35f81645bc92c9a241b4a98b617b | |
parent | 5c9af71090e230bcfe2fe42d176520f04adf5faf (diff) | |
download | vyatta-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-x | lib/Vyatta/IpTables/IpSet.pm | 4 |
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 { |