summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-04-26 22:10:02 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-04-26 22:10:02 +0000
commitb146f6a2075541747730f638620d4d2c7bce05a0 (patch)
treea4852926f23c4766dcc5fc348bcf619ea687d40a /etc
parente8bb1f3bc5c82c080b6edb4ee3b40b36d5a014e9 (diff)
downloadpfsense-b146f6a2075541747730f638620d4d2c7bce05a0.zip
pfsense-b146f6a2075541747730f638620d4d2c7bce05a0.tar.gz
Do not foreach through $ipseccfg['tunnel'] if its not defined
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/vpn.inc15
1 files changed, 8 insertions, 7 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 700d847..5df58b6 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -357,14 +357,15 @@ EOD;
/* start racoon */
mwexec("/usr/local/sbin/racoon -d -f {$g['varetc_path']}/racoon.conf");
- foreach ($ipseccfg['tunnel'] as $tunnel) {
- if (isset($tunnel['auto'])) {
- $remotehost = substr($tunnel['remote-subnet'],0,strpos($tunnel['remote-subnet'],"/"));
- $srchost = vpn_endpoint_determine($tunnel, $curwanip);
- if ($srchost)
- mwexec_bg("/sbin/ping -c 1 -S {$srchost} {$remotehost}");
+ if(is_array($ipseccfg['tunnel']))
+ foreach ($ipseccfg['tunnel'] as $tunnel) {
+ if (isset($tunnel['auto'])) {
+ $remotehost = substr($tunnel['remote-subnet'],0,strpos($tunnel['remote-subnet'],"/"));
+ $srchost = vpn_endpoint_determine($tunnel, $curwanip);
+ if ($srchost)
+ mwexec_bg("/sbin/ping -c 1 -S {$srchost} {$remotehost}");
+ }
}
- }
}
}
OpenPOWER on IntegriCloud