mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix #4318 - gen_subnetv4_max() not working on 32bit
This commit is contained in:
parent
0f062592ee
commit
e69a0cf3a2
@ -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 "";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user