]> git.ipfire.org Git - people/ms/network.git/commitdiff
vti: Disable policy lookups for VTI devices
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 31 Jul 2017 09:28:33 +0000 (11:28 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 31 Jul 2017 09:28:33 +0000 (11:28 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.ip-tunnel

index df59aadea2ae377783f0b1f4476727befc34144c..5e6bd8e63f2ae2990fbe7bea78b69e29a13a2f24 100644 (file)
@@ -109,6 +109,13 @@ ip_tunnel_add() {
                error "Could not create tunnel device ${device}"
                return ${EXIT_ERROR}
        fi
+
+       # Disable policy lookups for VTI devices
+       if [ "${mode}" = "vti" ]; then
+               sysctl_set "net.ipv4.conf.${device}.disable_policy" "1"
+       fi
+
+       return ${EXIT_OK}
 }
 
 ip_tunnel_del() {