mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 10:35:27 +00:00
rc.newwanip[v6] - only reconfigure an interface if it's either a non static non dhcp[6] variant or the address has changed.
It might be possible to skip the whole !is_ipaddr(), but the side affects aren't fully clear hence the != dhcp[6] to ease implementation. Before this commit, dhcp[6] interfaces always tried to reconfigure, which makes the whole comparison quite useless. related to https://github.com/opnsense/core/issues/5624
This commit is contained in:
parent
10e6759ab6
commit
8c49c7bfdd
@ -146,8 +146,9 @@ ifgroup_setup();
|
||||
|
||||
$cacheip_file = "/tmp/{$interface_real}_oldip";
|
||||
$cacheip = trim(@file_get_contents($cacheip_file));
|
||||
$intf_ipaddr = $config['interfaces'][$interface]['ipaddr'];
|
||||
|
||||
if ($ip != $cacheip || !is_ipaddr($config['interfaces'][$interface]['ipaddr'])) {
|
||||
if ($ip != $cacheip || (!is_ipaddr($intf_ipaddr) && $intf_ipaddr != 'dhcp')) {
|
||||
system_routing_configure(false, $interface);
|
||||
plugins_configure('monitor');
|
||||
filter_configure_sync();
|
||||
|
||||
@ -84,8 +84,9 @@ system_hosts_generate();
|
||||
|
||||
$cacheip_file = "/tmp/{$interface_real}_oldipv6";
|
||||
$cacheip = trim(@file_get_contents($cacheip_file));
|
||||
$intf_ipaddr = $config['interfaces'][$interface]['ipaddrv6'];
|
||||
|
||||
if ($ip != $cacheip || !is_ipaddr($config['interfaces'][$interface]['ipaddrv6'])) {
|
||||
if ($ip != $cacheip || (!is_ipaddr($intf_ipaddr) && $intf_ipaddr != 'dhcp6')) {
|
||||
if ($ip == $cacheip) {
|
||||
if (in_array($config['interfaces'][$interface]['ipaddr'], array('l2tp', 'ppp', 'pppoe', 'pptp'))) {
|
||||
/* PPP reconnect loop avoidance */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user