]> git.ipfire.org Git - people/stevee/network.git/commitdiff
ip-tunnel: Use "ip link" instead of "ip tunnel"
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Aug 2017 14:49:10 +0000 (14:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Aug 2017 14:49:10 +0000 (14:49 +0000)
ip tunnel seems to be in an awful condition and ip
link works just fine.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.ip-tunnel

index c28851301dd88059c6959317e1702c032a37fca3..0e1115b2dade999875fb3528befff544213aaffb 100644 (file)
@@ -107,7 +107,7 @@ ip_tunnel_add() {
        log DEBUG "Creating tunnel device '${device}' (mode=${mode})..."
 
        # Create the device.
-       if ! cmd ip tunnel add ${device} mode ${mode} ${cmd_args}; then
+       if ! cmd ip link add name ${device} type ${mode} ${cmd_args}; then
                error "Could not create tunnel device ${device}"
                return ${EXIT_ERROR}
        fi
@@ -129,7 +129,7 @@ ip_tunnel_del() {
 
        log DEBUG "Removing tunnel device '${device}'..."
 
-       ip tunnel del ${device}
+       ip link del ${device}
        assert [ $? -eq 0 ]
 }