lwtunnel: subtract tunnel headroom from mtu on output redirect
authorDavid Lebrun <david.lebrun@uclouvain.be>
Wed, 16 Nov 2016 09:05:46 +0000 (10:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 22:01:15 +0000 (17:01 -0500)
commita23a8f5bc17e6209eefadcd1cb3d3e28a2cdf530
tree000bc1bfe0f3522169d571d5b8b8fe571261b45e
parentd331d30360d7d10c4150a5a6452bc8d9aeb5784f
lwtunnel: subtract tunnel headroom from mtu on output redirect

This patch changes the lwtunnel_headroom() function which is called
in ipv4_mtu() and ip6_mtu(), to also return the correct headroom
value when the lwtunnel state is OUTPUT_REDIRECT.

This patch enables e.g. SR-IPv6 encapsulations to work without
manually setting the route mtu.

Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/lwtunnel.h