summaryrefslogtreecommitdiffstats
path: root/etc/inc/vpn.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r--etc/inc/vpn.inc13
1 files changed, 7 insertions, 6 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 437f148..0430ce3 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -154,8 +154,9 @@ function vpn_ipsec_configure($restart = false) {
mwexec("/sbin/ifconfig enc0 up");
set_single_sysctl("net.inet.ip.ipsec_in_use", "1");
- if (php_uname('m') != "amd64")
+ if (php_uname('m') != "amd64") {
set_single_sysctl("net.inet.ipsec.directdispatch", "0");
+ }
/* needed for config files */
if (!is_dir("{$g['varetc_path']}/ipsec")) {
@@ -683,7 +684,7 @@ EOD;
/* begin ipsec.conf */
$ipsecconf = "";
$enablecompression = false;
- if (is_array($a_phase1) && count($a_phase1)) {
+ if (is_array($a_phase1) && count($a_phase1)) {
$ipsecconf .= "# This file is automatically generated. Do not edit\n";
$ipsecconf .= "config setup\n\tuniqueids = {$uniqueids}\n";
@@ -1005,7 +1006,7 @@ EOD;
continue;
}
if (!empty($ph2ent['natlocalid'])) {
- $natleftsubnet_data = ipsec_idinfo_to_cidr($ph2ent['natlocalid'], false, $ph2ent['mode']);
+ $natleftsubnet_data = ipsec_idinfo_to_cidr($ph2ent['natlocalid'], false, $ph2ent['mode']);
if ($ph2ent['natlocalid']['type'] != "address") {
if (is_subnet($natleftsubnet_data)) {
$leftsubnet_data = "{$natleftsubnet_data}|{$leftsubnet_data}";
@@ -1063,7 +1064,7 @@ EOD;
/* XXX: in some cases where include ordering is suspect these variables
* are somehow 0 and we enter this loop forever and timeout after 900
* seconds wrecking bootup */
- if ($key_hi != 0 and $key_lo !=0 and $key_step !=0) {
+ if ($key_hi != 0 and $key_lo != 0 and $key_step != 0) {
for ($keylen = $key_hi; $keylen >= $key_lo; $keylen -= $key_step) {
if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
foreach ($ph2ent['hash-algorithm-option'] as $halgo) {
@@ -1449,8 +1450,8 @@ EOD;
EOD;
}
- if (isset($pptpdcfg["wins"]) && $pptpdcfg['wins'] != "") {
- $mpdconf .= " set ipcp nbns {$pptpdcfg['wins']}\n";
+ if (isset($pptpdcfg["wins"]) && $pptpdcfg['wins'] != "") {
+ $mpdconf .= " set ipcp nbns {$pptpdcfg['wins']}\n";
}
if (!empty($pptpdcfg['dns1'])) {
OpenPOWER on IntegriCloud