]> git.ipfire.org Git - people/ms/network.git/commitdiff
ipsec: Change mode to transport/tunnel only
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Sep 2018 11:30:17 +0000 (13:30 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Sep 2018 11:30:17 +0000 (13:30 +0200)
VTI is being removed and will be possible via the new
zone command.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/bash-completion/network
src/functions/functions.ipsec

index d19dcf2731a341dfd239448de12f95aca3bf5065..15c78903c80189af41379a9fb75be52399497000 100644 (file)
@@ -513,7 +513,7 @@ _network_vpn_ipsec_connection_subcommands_authentication_mode() {
 _network_vpn_ipsec_connection_subcommands_mode() {
        local words=( $@ )
 
-       local commands="gre-transport tunnel vti"
+       local commands="transport tunnel"
        local cmd="$(_network_find_on_cmdline "${commands}")"
        if [[ -z "${cmd}" ]]; then
                COMPREPLY=( $(compgen -W "${commands}" -- "${cur}") )
index b7e09a4c67119624a2365f22a5267dc2b9c4869c..4e4c45dacc1134870beb377b5d4770bf5fb2c745 100644 (file)
@@ -52,7 +52,7 @@ IPSEC_DEFAULT_SECURITY_POLICY="system"
 IPSEC_DEFAULT_START_ACTION="on-demand"
 IPSEC_DEFAULT_TYPE="net-to-net"
 
-IPSEC_VALID_MODES="gre-transport tunnel vti"
+IPSEC_VALID_MODES="transport tunnel"
 IPSEC_VALID_AUTH_MODES="PSK"
 
 cli_ipsec() {
@@ -224,15 +224,12 @@ cli_ipsec_connection_show() {
        cli_headline 2 "Misc."
 
        case "${MODE}" in
-               gre-transport)
-                       cli_print_fmt1 2 "Transport Mode" "GRE Transport"
+               transport)
+                       cli_print_fmt1 2 "Transport Mode" "Transport"
                        ;;
                tunnel)
                        cli_print_fmt1 2 "Transport Mode" "Tunnel"
                        ;;
-               vti)
-                       cli_print_fmt1 2 "Transport Mode" "Virtual Tunnel Interface"
-                       ;;
                *)
                        cli_print_fmt1 2 "Transport Mode" "- Unknown -"
                        ;;
@@ -1492,12 +1489,15 @@ _ipsec_connection_to_strongswan_connection() {
        # Mode
        print_indent 4 "# Mode"
        case "${MODE}" in
-               gre-transport)
+               transport)
                        print_indent 4 "mode = transport"
                        ;;
-               tunnel|vti|*)
+               tunnel)
                        print_indent 4 "mode = tunnel"
                        ;;
+               *)
+                       log WARNING "Unsupported IPsec mode: ${mode}"
+                       ;;
        esac
        print