summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.newwanipv626
1 files changed, 14 insertions, 12 deletions
diff --git a/etc/rc.newwanipv6 b/etc/rc.newwanipv6
index 5fd9c30..8204af1 100755
--- a/etc/rc.newwanipv6
+++ b/etc/rc.newwanipv6
@@ -131,18 +131,20 @@ setup_gateways_monitor();
/* signal filter reload */
filter_configure();
-if (is_ipaddr($oldipv6) && $curwanipv6 == $oldipv6) {
- // Still need to sync VPNs on PPPoE and such, as even with the same IP the VPN software is unhappy with the IP disappearing.
- if (in_array($config['interfaces'][$interface]['ipaddrv6'], array('pppoe', 'pptp', 'ppp'))) {
- /* reconfigure IPsec tunnels */
- vpn_ipsec_force_reload();
-
- /* start OpenVPN server & clients */
- openvpn_resync_all($interface);
- }
- exit;
-} else
- mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete");
+if (is_ipaddrv6($oldipv6)) {
+ if ($curwanipv6 == $oldipv6) {
+ // Still need to sync VPNs on PPPoE and such, as even with the same IP the VPN software is unhappy with the IP disappearing.
+ if (in_array($config['interfaces'][$interface]['ipaddrv6'], array('pppoe', 'pptp', 'ppp'))) {
+ /* reconfigure IPsec tunnels */
+ vpn_ipsec_force_reload();
+
+ /* start OpenVPN server & clients */
+ openvpn_resync_all($interface);
+ }
+ exit;
+ } else
+ mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete");
+}
file_put_contents("{$g['vardb_path']}/{$interface}_cacheipv6", $curwanipv6);
OpenPOWER on IntegriCloud