]> git.baikalelectronics.ru Git - kernel.git/commit
net: ip_tunnel: fix mtu calculation
authorVadim Fedorenko <vfedorenko@novek.ru>
Fri, 29 Jan 2021 22:27:47 +0000 (01:27 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 2 Feb 2021 03:58:23 +0000 (19:58 -0800)
commit74f49b64b936e6f9c284433e57729e5cc2ef4f73
tree6cae5c0b2a5f65e65718ecddc5f173d19c890195
parent71982688de2f253eb5e4c103e23215ca5fe3c777
net: ip_tunnel: fix mtu calculation

dev->hard_header_len for tunnel interface is set only when header_ops
are set too and already contains full overhead of any tunnel encapsulation.
That's why there is not need to use this overhead twice in mtu calc.

Fixes: 1df3b5bcaacb ("ip_gre: set dev->hard_header_len and dev->needed_headroom properly")
Reported-by: Slava Bacherikov <mail@slava.cc>
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Link: https://lore.kernel.org/r/1611959267-20536-1-git-send-email-vfedorenko@novek.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/ip_tunnel.c