summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanipv6
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-03-18 10:31:48 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-03-18 10:32:30 -0300
commitf6461410c2b573fc43d4179a48229130a8f796cd (patch)
treee9ccd0dc8c802f6eeeb01ef0a90be99568554c31 /etc/rc.newwanipv6
parent67864df7bbe435423691d98995699ae3b0802573 (diff)
downloadpfsense-f6461410c2b573fc43d4179a48229130a8f796cd.zip
pfsense-f6461410c2b573fc43d4179a48229130a8f796cd.tar.gz
Avoid trying to remove an invalid IP
Diffstat (limited to 'etc/rc.newwanipv6')
-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