mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
CARP/VIP, remove address requirement for virtual ip's, closes https://github.com/opnsense/core/issues/2358
This commit is contained in:
parent
1daf7466d4
commit
075a0b7a4a
@ -1707,22 +1707,6 @@ function interface_carp_configure(&$vip)
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_ipaddrv4($vip['subnet'])) {
|
||||
/* Ensure a IP on this interface exists prior to configuring CARP. */
|
||||
$ww_subnet_ip = find_interface_ip($realif);
|
||||
if (!is_ipaddrv4($ww_subnet_ip)) {
|
||||
file_notice("CARP", sprintf(gettext("Sorry but we could not find a required assigned ip address on the interface for the virtual IP address %s."), $vip['subnet']), "Firewall: Virtual IP", "");
|
||||
return;
|
||||
}
|
||||
} elseif (is_ipaddrv6($vip['subnet'])) {
|
||||
/* Ensure a IP on this interface exists prior to configuring CARP. */
|
||||
$ww_subnet_ip = find_interface_ipv6($realif);
|
||||
if (!is_ipaddrv6($ww_subnet_ip)) {
|
||||
file_notice("CARP", sprintf(gettext("Sorry but we could not find a required assigned ip address on the interface for the virtual IPv6 address %s."), $vip['subnet']), "Firewall: Virtual IP", "");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$vip_password = $vip['password'];
|
||||
$vip_password = escapeshellarg(addslashes(str_replace(" ", "", $vip_password)));
|
||||
if ($vip['password'] != "") {
|
||||
|
||||
@ -113,13 +113,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$input_errors[] = gettext("A valid IP address must be specified.");
|
||||
}
|
||||
|
||||
$natiflist = get_configured_interface_with_descr();
|
||||
foreach ($natiflist as $natif => $natdescr) {
|
||||
if ($pconfig['interface'] == $natif && (empty($config['interfaces'][$natif]['ipaddr']) && empty($config['interfaces'][$natif]['ipaddrv6']))) {
|
||||
$input_errors[] = gettext("The interface chosen for the VIP has no IPv4 or IPv6 address configured so it cannot be used as a parent for the VIP.");
|
||||
}
|
||||
}
|
||||
|
||||
/* ipalias and carp should not use network or broadcast address */
|
||||
if ($pconfig['mode'] == "ipalias" || $pconfig['mode'] == "carp") {
|
||||
if (is_ipaddrv4($pconfig['subnet']) && $pconfig['subnet_bits'] != "32") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user