From acdcdb2d5492b92f2a541ff5162202771440faaa Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Fri, 2 Oct 2015 00:03:33 -0500 Subject: [PATCH] Specify PSK for mobile configurations without the leading ID selectors. Fixes PSK mismatches from iOS clients. --- etc/inc/vpn.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 45b27ff9a9..987e3d34ea 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -675,6 +675,9 @@ EOD; if (!empty($ph1ent['pre-shared-key'])) { $pskconf .= "{$myid} {$peerid} : PSK 0s" . base64_encode(trim($ph1ent['pre-shared-key'])) . "\n"; + if (isset($ph1ent['mobile'])) { + $pskconf .= " : PSK 0s" . base64_encode(trim($ph1ent['pre-shared-key'])) . "\n"; + } } } }