]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
IPsec: Write tunnel/transport mode to strongSwan configuration
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 27 Nov 2018 18:42:07 +0000 (18:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 4 Feb 2019 18:20:36 +0000 (18:20 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/vpnmain.cgi

index f7a1c5e52d7f0a6be2057ac790bc9e2e0f41c1a2..5e3015393e50fe5e4741383b13b970d72e1abafa 100644 (file)
@@ -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';