Skip to content

Commit

Permalink
Fix #4318 - gen_subnetv4_max() not working on 32bit
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Jan 28, 2015
1 parent 0f06259 commit e69a0cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/inc/util.inc
Expand Up @@ -349,7 +349,7 @@ function gen_subnetv4_max($ipaddr, $bits) {
if (is_ipaddrv4($ipaddr) && is_numericint($bits) && $bits <= 32) {
if ($bits == 32)
return $ipaddr;
return long2ip(ip2long($ipaddr) | (0xFFFFFFFF >> $bits));
return long2ip32(ip2long($ipaddr) | ~gen_subnet_mask_long($bits));
}
return "";
}
Expand Down

0 comments on commit e69a0cf

Please sign in to comment.