ipsec: fix mobile switch logic

PR: https://forum.opnsense.org/index.php?topic=27291.0
This commit is contained in:
Franco Fichtner 2022-03-03 08:11:10 +01:00
parent 901523cb01
commit f064082abc

View File

@ -189,7 +189,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
/* mobile client */
foreach ($config['ipsec']['phase1'] as $phase1ent) {
if ($phase1ent['ikeid'] == $pconfig['ikeid']) {
if ($phase1ent['ikeid'] == $pconfig['ikeid'] && isset($phase1ent['mobile'])) {
$pconfig['mobile'] = true;
break;
}