2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-02 16:28:25 +00:00

Fix infinite loop if unfortunate IPv6 encountered

This commit is contained in:
Jarrod Johnson
2018-03-05 13:47:49 -05:00
parent 08c29357bf
commit 0e070cd2fd

View File

@@ -2187,7 +2187,10 @@ sub getzonesfornet {
$rev .= $_ . ".";
$nibbs--;
}
while ($nibbs) {
if ($nibbs < 1) {
return (); # Don't presume to handle maskless subnets...
}
while ($nibbs > 0) {
$rev .= "0.";
$nibbs--;
}