From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 14/16] IPsec: Strip @ from IDs in Apple profile Date: Thu, 28 May 2020 17:58:48 +0000 Message-ID: <20200528175850.12638-15-michael.tremer@ipfire.org> In-Reply-To: <20200528175850.12638-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3500826248693322740==" List-Id: --===============3500826248693322740== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Signed-off-by: Michael Tremer --- html/cgi-bin/vpnmain.cgi | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 1e4115e95..2e0dd797d 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -1390,14 +1390,28 @@ END # Left ID if ($confighash{$key}[9]) { + my $leftid = $confighash{$key}[9]; + + # Strip leading @ from FQDNs + if ($leftid =~ m/^@(.*)$/) { + $leftid = $1; + } + print " LocalIdentifier\n"; - print " $confighash{$key}[9]\n"; + print " $leftid\n"; } # Right ID if ($confighash{$key}[7]) { + my $rightid = $confighash{$key}[7]; + + # Strip leading @ from FQDNs + if ($rightid =~ m/^@(.*)$/) { + $rightid = $1; + } + print " RemoteIdentifier\n"; - print " $confighash{$key}[7]\n"; + print " $rightid\n"; } if ($confighash{$key}[4] eq "cert") { -- 2.20.1 --===============3500826248693322740==--