Commit dfd53322 authored by Ad Schellevis's avatar Ad Schellevis

(carp) remove restriction for matching interface subnet. closes...

(carp) remove restriction for matching interface subnet. closes https://github.com/opnsense/core/issues/795
parent d28c4632
......@@ -157,21 +157,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members.");
}
if (is_ipaddrv4($pconfig['subnet'])) {
$parent_ip = get_interface_ip($pconfig['interface']);
$parent_sn = get_interface_subnet($pconfig['interface']);
$subnet = gen_subnet($parent_ip, $parent_sn);
} else if (is_ipaddrv6($pconfig['subnet'])) {
$parent_ip = get_interface_ipv6($pconfig['interface']);
$parent_sn = get_interface_subnetv6($pconfig['interface']);
$subnet = gen_subnetv6($parent_ip, $parent_sn);
}
if (isset($parent_ip) && !ip_in_subnet($pconfig['subnet'], "{$subnet}/{$parent_sn}") && !ip_in_interface_alias_subnet($pconfig['interface'], $pconfig['subnet'])) {
$cannot_find = $pconfig['subnet'] . "/" . $pconfig['subnet_bits'] ;
$input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."),$cannot_find);
}
if ($pconfig['interface'] == "lo0") {
$input_errors[] = gettext("For this type of vip localhost is not allowed.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment