VPN / IPsec - mobile property passing in phase 2, make sure we can add a mobile phase 2 again, at some point we should remove the phase 2 mobile attribute for being a copy of its parent. for https://github.com/opnsense/core/issues/5598

This commit is contained in:
Ad Schellevis 2022-02-24 15:36:07 +01:00
parent 652ae0881c
commit 87f0302e79

View File

@ -188,9 +188,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['uniqid'] = uniqid();
/* mobile client */
if (isset($_GET['mobile'])) {
$pconfig['mobile'] = true;
foreach ($config['ipsec']['phase1'] as $phase1ent) {
if ($phase1ent['ikeid'] == $pconfig['ikeid']) {
$pconfig['mobile'] = true;
break;
}
}
// init empty
foreach (explode(",", $phase2_fields) as $fieldname) {
$fieldname = trim($fieldname);