Commit 12c3c0c2 authored by Franco Fichtner's avatar Franco Fichtner

ipsec: mobike is only for IKEv2, coding style

Submitted by: Armin Tüting
parent 336cbd67
...@@ -994,7 +994,6 @@ EOD; ...@@ -994,7 +994,6 @@ EOD;
} }
$conn_params = ""; $conn_params = "";
$aggressive = $ph1ent['mode'] == "aggressive" ? "yes" : "no"; $aggressive = $ph1ent['mode'] == "aggressive" ? "yes" : "no";
$mobike = !empty($ph1ent['mobike']) ? "mobike = no" : " mobike = yes";
$ep = ipsec_get_phase1_src($ph1ent); $ep = ipsec_get_phase1_src($ph1ent);
if (empty($ep)) { if (empty($ep)) {
...@@ -1004,6 +1003,7 @@ EOD; ...@@ -1004,6 +1003,7 @@ EOD;
$keyexchange = "ikev1"; $keyexchange = "ikev1";
if (!empty($ph1ent['iketype']) && $ph1ent['iketype'] != "ikev1") { if (!empty($ph1ent['iketype']) && $ph1ent['iketype'] != "ikev1") {
$keyexchange = "ikev2"; $keyexchange = "ikev2";
$mobike = !empty($ph1ent['mobike']) ? "mobike = no" : "mobike = yes";
} }
if (isset($ph1ent['mobile'])) { if (isset($ph1ent['mobile'])) {
...@@ -1142,7 +1142,7 @@ EOD; ...@@ -1142,7 +1142,7 @@ EOD;
continue; continue;
} }
if (($ph2ent['mode'] == 'tunnel') or ($ph2ent['mode'] == 'tunnel6')) { if (($ph2ent['mode'] == 'tunnel') || ($ph2ent['mode'] == 'tunnel6')) {
$tunneltype = "type = tunnel"; $tunneltype = "type = tunnel";
$localid_type = $ph2ent['localid']['type']; $localid_type = $ph2ent['localid']['type'];
$leftsubnet_data = ipsec_idinfo_to_cidr($ph2ent['localid'], false, $ph2ent['mode']); $leftsubnet_data = ipsec_idinfo_to_cidr($ph2ent['localid'], false, $ph2ent['mode']);
...@@ -1280,10 +1280,10 @@ conn con<<connectionId>> ...@@ -1280,10 +1280,10 @@ conn con<<connectionId>>
aggressive = {$aggressive} aggressive = {$aggressive}
fragmentation = yes fragmentation = yes
keyexchange = {$keyexchange} keyexchange = {$keyexchange}
{$mobike}
{$reauth} {$reauth}
{$rekey} {$rekey}
{$forceencaps} {$forceencaps}
{$mobike}
installpolicy = yes installpolicy = yes
{$tunneltype} {$tunneltype}
{$dpdline} {$dpdline}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment