diff --git a/src/www/vpn_ipsec_phase2.php b/src/www/vpn_ipsec_phase2.php index 12e6991eb..c9869b65a 100644 --- a/src/www/vpn_ipsec_phase2.php +++ b/src/www/vpn_ipsec_phase2.php @@ -274,7 +274,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (isset($pconfig['mobile'])) { /* User is adding phase 2 for mobile phase1 */ foreach ($config['ipsec']['phase2'] as $key => $name) { - if (isset($name['mobile']) && $name['uniqid'] != $pconfig['uniqid']) { + if (isset($name['mobile']) && $pconfig['ikeid'] == $name['ikeid'] && $name['uniqid'] != $pconfig['uniqid']) { /* check duplicate localids only for mobile clents */ $localid_data = ipsec_idinfo_to_cidr($name['localid'], false, $name['mode']); $entered = array();