summaryrefslogtreecommitdiff
path: root/scripts/firewall/vyatta-ipset.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/firewall/vyatta-ipset.pl')
-rwxr-xr-xscripts/firewall/vyatta-ipset.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/firewall/vyatta-ipset.pl b/scripts/firewall/vyatta-ipset.pl
index 57b8ce1..9402417 100755
--- a/scripts/firewall/vyatta-ipset.pl
+++ b/scripts/firewall/vyatta-ipset.pl
@@ -74,7 +74,10 @@ sub ipset_delete_member {
die "Error: undefined member" if ! defined $member;
my $group = new Vyatta::IpTables::IpSet($set_name);
- return $group->delete_member($member);
+ if ($group->exists($set_name) && $group->check_member($member)) {
+ return $group->delete_member($member);
+ }
+ return;
}
sub ipset_check_set_type {