From: Michael Tremer Date: Tue, 27 Nov 2018 18:42:07 +0000 (+0000) Subject: IPsec: Write tunnel/transport mode to strongSwan configuration X-Git-Tag: v2.23-core131~197^2~46 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=326728d53d1ed4cedf8d180ab51ddfedb1488045 IPsec: Write tunnel/transport mode to strongSwan configuration Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index f7a1c5e52d..5e3015393e 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -313,6 +313,13 @@ sub writeipsecfiles { print CONF "\tleftid=\"$lconfighash{$key}[7]\"\n" if ($lconfighash{$key}[7]); print CONF "\trightid=\"$lconfighash{$key}[9]\"\n" if ($lconfighash{$key}[9]); + # Set mode + if ($lconfighash{$key}[35] eq "transport") { + print CONF "\ttype=transport\n"; + } else { + print CONF "\ttype=tunnel\n"; + } + # Is PFS enabled? my $pfs = $lconfighash{$key}[28] eq 'on' ? 'on' : 'off';