mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
system: only log on automatic far gateway detect #5493
This commit is contained in:
parent
6c12235b07
commit
7fa1f8b8be
@ -482,11 +482,13 @@ function system_default_route($gateway, $family, $interface, $far = false)
|
||||
log_error("ROUTING: creating /tmp/{$realif}_defaultgw using '{$gateway}'");
|
||||
@file_put_contents("/tmp/{$realif}_defaultgw", $gateway);
|
||||
|
||||
list (, $network) = interfaces_primary_address($interface);
|
||||
if (!$far && ip_in_subnet($gateway, $network)) {
|
||||
$realif = null;
|
||||
} else {
|
||||
log_error("ROUTING: treating gateway '{$gateway}' as far gateway");
|
||||
if (!$far) {
|
||||
list (, $network) = interfaces_primary_address($interface);
|
||||
if (ip_in_subnet($gateway, $network)) {
|
||||
$realif = null;
|
||||
} else {
|
||||
log_error("ROUTING: treating gateway '{$gateway}' as far gateway");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach (glob('/tmp/*_defaultgwv6') as $to_delete) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user