System: Gateways: Configuration - regression in Gateway MVC conversion forcing far gateways where none should exist. closes https://github.com/opnsense/core/issues/7483

This might be the cause of some weird VPN issues earlier as well, because a host route will prevent the actual address being configured later in some cases.
While here, also fix a minor php warning (item doesn't exist).
This commit is contained in:
Ad Schellevis 2024-05-25 09:46:23 +02:00
parent 0bb13de0fe
commit a683004fba

View File

@ -551,7 +551,7 @@ function system_interface_route($gw, $routes)
{
$interface = $gw['interface'];
$gateway = $gw['gateway'] ?? 'missing';
$far = isset($gw['fargw']);
$far = !empty($gw['fargw']);
$device = $gw['if'];
$family = 'inet';
@ -726,8 +726,8 @@ function system_routing_configure($verbose = false, $interface = null, $monitor
}
$interfacegw = $gateway['if'];
$gatewayip = $gateway['gateway'];
$fargw = isset($gateway['fargw']) && $gateway['ipprotocol'] != 'inet6';
$gatewayip = $gateway['gateway'] ?? '';
$fargw = !empty($gateway['fargw']) && $gateway['ipprotocol'] != 'inet6';
$blackhole = '';
switch ($rtent['gateway']) {