From 87f0302e79815765284b299791da2cf1f49c4e52 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 24 Feb 2022 15:36:07 +0100 Subject: [PATCH] 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 --- src/www/vpn_ipsec_phase2.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/www/vpn_ipsec_phase2.php b/src/www/vpn_ipsec_phase2.php index 2efcb41aa..8baf8a27d 100644 --- a/src/www/vpn_ipsec_phase2.php +++ b/src/www/vpn_ipsec_phase2.php @@ -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);