[pve-devel] [PATCH 10/18] fix ipversion detection in range
Alexandre Derumier
aderumier at odiso.com
Tue Jul 15 09:58:08 CEST 2014
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
src/PVE/Firewall.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index f1ff636..25d4d50 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -837,7 +837,10 @@ sub parse_address_list {
die "invalid IP address: $err\n";
}
$iprange = 1 if $elem =~ m/-/;
- $ipversion = Net::IP::ip_get_version($elem); #fixme : don't work with range
+
+ foreach my $elemrange (split(/-/, $elem)) {
+ $ipversion = get_ip_version($elemrange);
+ }
}
die "you can use a range in a list\n" if $iprange && $count > 1;
--
1.7.10.4
More information about the pve-devel
mailing list