[pve-devel] [PATCH 10/19] fix ipversion detection in range

Alexandre Derumier aderumier at odiso.com
Wed Jul 16 01:14:26 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 8e96571..e2342d7 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