interfaces: disable reload with same IPv6

rtsold resolvconf handing forces a lot of reloads now, something
also seen in rc.newwanip -- let's go the extra mile and lock the
cache IP in place until we do a full reconfigure.

We may have to build some sort of "expire" feature for the cached
IP since between forced reconnects we will want to reload again
anyway.  But not sure where that is as rc.linkup is unreliable as
it has been messing with this before.
This commit is contained in:
Franco Fichtner 2022-08-01 12:24:53 +02:00
parent 507ee2768f
commit 97e7a93b7c

View File

@ -89,14 +89,7 @@ link_interface_to_track6($interface, true);
$cacheip_file = "/tmp/{$interface_real}_oldipv6";
$cacheip = trim(@file_get_contents($cacheip_file));
if ($ip != $cacheip || !is_ipaddr($config['interfaces'][$interface]['ipaddrv6'])) {
if ($ip == $cacheip) {
if (in_array($config['interfaces'][$interface]['ipaddr'], array('l2tp', 'ppp', 'pppoe', 'pptp'))) {
/* PPP reconnect loop avoidance */
return;
}
}
if ($ip != $cacheip) {
system_routing_configure(false, $interface);
plugins_configure('monitor');
filter_configure_sync();