summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-13 20:21:19 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-13 20:21:31 +0100
commit656fd270f0a59227ad60c8eff41599d5fd39e0e8 (patch)
tree233f08c29dcf22a82e6671072e4f189dd3c3b421
parenta2feea37449a0aae930bcf130134cf74c3f4793e (diff)
downloadpfsense-656fd270f0a59227ad60c8eff41599d5fd39e0e8.zip
pfsense-656fd270f0a59227ad60c8eff41599d5fd39e0e8.tar.gz
Add some saftey belts here to be safe
-rw-r--r--etc/inc/vpn.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index e0a66e0..1e3335d 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -862,7 +862,8 @@ EOD;
$ipsecfin = '';
foreach ($rightsubnet_spec as $idx => $rsubnet) {
$ipsecfin .= "\nconn con{$ph1ent['ikeid']}00{$idx}\n";
- $ipsecfin .= "\treqid = " . $reqids[$idx] . "\n";
+ if (!empty($reqids[$idx]))
+ $ipsecfin .= "\treqid = " . $reqids[$idx] . "\n";
$ipsecfin .= $ipsecconnect;
$ipsecfin .= "\trightsubnet = {$rsubnet}\n";
$ipsecfin .= "\tleftsubnet = " . $leftsubnet_spec[$idx] . "\n";
@@ -871,7 +872,8 @@ EOD;
log_error("No phase2 specifications for tunnel with REQID = {$ikeid}");
} else {
$ipsecfin = "\nconn con{$ph1ent['ikeid']}\n";
- $ipsecfin .= "\treqid = " . $reqids[0] . "\n";
+ if (!empty($reqids[$idx]))
+ $ipsecfin .= "\treqid = " . $reqids[0] . "\n";
$ipsecfin .= $ipsecconnect;
if (!empty($rightsubnet_spec)) {
$tempsubnets = array();
OpenPOWER on IntegriCloud