diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-03-18 10:31:48 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-03-18 10:32:30 -0300 |
commit | f6461410c2b573fc43d4179a48229130a8f796cd (patch) | |
tree | e9ccd0dc8c802f6eeeb01ef0a90be99568554c31 /etc/rc.newwanipv6 | |
parent | 67864df7bbe435423691d98995699ae3b0802573 (diff) | |
download | pfsense-f6461410c2b573fc43d4179a48229130a8f796cd.zip pfsense-f6461410c2b573fc43d4179a48229130a8f796cd.tar.gz |
Avoid trying to remove an invalid IP
Diffstat (limited to 'etc/rc.newwanipv6')
-rwxr-xr-x | etc/rc.newwanipv6 | 26 |
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); |