]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: apply lwtunnel encap for locally-generated packets
authorRobert Shearman <rshearma@brocade.com>
Mon, 3 Aug 2015 16:39:21 +0000 (17:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Aug 2015 05:26:14 +0000 (22:26 -0700)
commitaf04e62f1ce72290446767b5caa756554f2e50e9
treeb4d102911e7e8af04d0f94df4dc734a331260fb7
parent64a2f235fbbbffa7d6b745b658661b7f63fa4836
ipv4: apply lwtunnel encap for locally-generated packets

lwtunnel encap is applied for forwarded packets, but not for
locally-generated packets. This is because the output function is not
overridden in __mkroute_output, unlike it is in __mkroute_input.

The lwtunnel state is correctly set on the rth through the call to
rt_set_nexthop, so all that needs to be done is to override the dst
output function to be lwtunnel_output if there is lwtunnel state
present and it requires output redirection.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c