Commit 43fa1b86 authored by Franco Fichtner's avatar Franco Fichtner

rc: refactor loop avoidance again, fix typo from historic commit

https://github.com/pfsense/pfsense/commit/46a7c9aae#diff-9f6cbcc34208589ed90d936a29cbe8c9R120
parent 0c514cee
......@@ -112,13 +112,6 @@ link_interface_to_track6($interface, "update");
system_resolvconf_generate();
system_hosts_generate();
if (is_ipaddrv6($curwanipv6) && $curwanipv6 == $oldipv6) {
if (in_array($config['interfaces'][$interface]['ipaddrv6'], array('pppoe', 'pptp', 'ppp'))) {
/* PPP reconnect loop avoidance */
return;
}
}
/*
* We need to force sync VPNs on such even when the IP is the same for dynamic interfaces.
* Even with the same IP the VPN software is unhappy with the IP disappearing, and we
......@@ -127,11 +120,16 @@ if (is_ipaddrv6($curwanipv6) && $curwanipv6 == $oldipv6) {
if (!is_ipaddrv6($oldipv6) || $curwanipv6 != $oldipv6 || !is_ipaddrv6($config['interfaces'][$interface]['ipaddrv6'])) {
if (is_ipaddrv6($curwanipv6)) {
@file_put_contents("/var/db/{$interface}_cacheipv6", $curwanipv6);
}
if ($curwanipv6 != $oldipv6 && is_ipaddrv6($oldipv6)) {
if (does_interface_exist($interface_real)) {
mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete");
if ($curwanipv6 == $oldipv6) {
if (in_array($config['interfaces'][$interface]['ipaddr'], array('l2tp', 'ppp', 'pppoe', 'pptp'))) {
/* PPP reconnect loop avoidance */
return;
}
} else {
if (does_interface_exist($interface_real)) {
mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete");
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment