]> git.baikalelectronics.ru Git - kernel.git/commit
net: lwtunnel: handle MTU calculation in forwading
authorVadim Fedorenko <vfedorenko@novek.ru>
Fri, 25 Jun 2021 16:21:39 +0000 (19:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jun 2021 19:42:14 +0000 (12:42 -0700)
commit6a27c55369e5f6c5472da36e540e59c0eaee2020
tree842aa81df2724b2eca90b7f5aad43fc8f9512e8f
parent31edc2eae697aad35ceec2eba0f5ac36b4f3e8bf
net: lwtunnel: handle MTU calculation in forwading

Commit 75be4fea23a6 ("net: lwtunnel: Handle fragmentation") moved
fragmentation logic away from lwtunnel by carry encap headroom and
use it in output MTU calculation. But the forwarding part was not
covered and created difference in MTU for output and forwarding and
further to silent drops on ipv4 forwarding path. Fix it by taking
into account lwtunnel encap headroom.

The same commit also introduced difference in how to treat RTAX_MTU
in IPv4 and IPv6 where latter explicitly removes lwtunnel encap
headroom from route MTU. Make IPv4 version do the same.

Fixes: 75be4fea23a6 ("net: lwtunnel: Handle fragmentation")
Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
include/net/ip6_route.h
net/ipv4/route.c