Fix CARP IP Creation. Subnet check was failing even for valid input. See ticket #1925

This commit is contained in:
jim-p 2009-05-12 16:08:59 -04:00
parent 1f381f93fd
commit 673e587db9

View File

@ -137,8 +137,8 @@ if ($_POST) {
$subnet_ip = return_first_two_octets($_POST['subnet']);
$iflist = get_configured_interface_list_by_realif(false, true);
foreach($iflist as $realif => $if) {
$ww_subnet_ip = get_interface_ip($realif);
$ww_subnet_bits = get_interface_subnet($realif);
$ww_subnet_ip = get_interface_ip($if);
$ww_subnet_bits = get_interface_subnet($if);
if (ip_in_subnet($_POST['subnet'], gen_subnet($ww_subnet_ip, $ww_subnet_bits) . "/" . $ww_subnet_bits))
$found = true;
}