summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta')
-rwxr-xr-xlib/Vyatta/IpTables/IpSet.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Vyatta/IpTables/IpSet.pm b/lib/Vyatta/IpTables/IpSet.pm
index 5f68950..f53202c 100755
--- a/lib/Vyatta/IpTables/IpSet.pm
+++ b/lib/Vyatta/IpTables/IpSet.pm
@@ -352,10 +352,11 @@ sub delete_member_range {
}
} elsif ($self->{_type} eq 'address') {
my $start_ip = new NetAddr::IP("$start/$addr_range_mask");
- my $stop_ip = new NetAddr::IP($stop);
+ my $stop_ip = new NetAddr::IP("$stop/$addr_range_mask");
for (; $start_ip <= $stop_ip; $start_ip++) {
my $rc = $self->delete_member($start_ip->addr());
return $rc if defined $rc;
+ last if $start_ip->cidr() eq $start_ip->broadcast();
}
}
return;