ip_tunnel: Allow policy-based routing through tunnels
authorCraig Gallek <kraig@google.com>
Wed, 19 Apr 2017 16:30:54 +0000 (12:30 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2017 17:21:31 +0000 (13:21 -0400)
commit9830ad4c6a7f8db18d3b0933875937e36470987d
tree3b2affaea677fa909c286e43a5fab7dd156b76a0
parent0a473b82cb23e7a35c4be6e9765c8487a65e8f55
ip_tunnel: Allow policy-based routing through tunnels

This feature allows the administrator to set an fwmark for
packets traversing a tunnel.  This allows the use of independent
routing tables for tunneled packets without the use of iptables.

There is no concept of per-packet routing decisions through IPv4
tunnels, so this implementation does not need to work with
per-packet route lookups as the v6 implementation may
(with IP6_TNL_F_USE_ORIG_FWMARK).

Further, since the v4 tunnel ioctls share datastructures
(which can not be trivially modified) with the kernel's internal
tunnel configuration structures, the mark attribute must be stored
in the tunnel structure itself and passed as a parameter when
creating or changing tunnel attributes.

Signed-off-by: Craig Gallek <kraig@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip_tunnels.h
net/ipv4/ip_gre.c
net/ipv4/ip_tunnel.c
net/ipv4/ip_vti.c
net/ipv4/ipip.c
net/ipv6/sit.c