mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
system: 'gateway' may be unset so set to impossible value (PHP warning)
This commit is contained in:
parent
299dbaa017
commit
fa22dce74c
@ -549,13 +549,13 @@ function system_host_route($host, $gateway)
|
||||
function system_interface_route($gw, $routes)
|
||||
{
|
||||
$interface = $gw['interface'];
|
||||
$gateway = $gw['gateway'];
|
||||
$gateway = $gw['gateway'] ?? 'missing';
|
||||
$far = isset($gw['fargw']);
|
||||
$device = $gw['if'];
|
||||
$family = 'inet';
|
||||
|
||||
if (!is_ipaddrv4($gateway)) {
|
||||
log_msg("ROUTING: not a valid interface gateway address: '{$gateway}'", LOG_ERR);
|
||||
log_msg("ROUTING: not a valid {$interface} interface gateway address: '{$gateway}'", LOG_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user