Re: [PATCH 4.19] net: ip_tunnel: fix mtu calculation for ETHER tunnel devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 23, 2021 at 10:00:31AM +0800, Hangbin Liu wrote:
> commit 9992a078b1771da354ac1f9737e1e639b687caa2 upstream.
> 
> Commit 28e104d00281 ("net: ip_tunnel: fix mtu calculation") removed
> dev->hard_header_len subtraction when calculate MTU for tunnel devices
> as there is an overhead for device that has header_ops.
> 
> But there are ETHER tunnel devices, like gre_tap or erspan, which don't
> have header_ops but set dev->hard_header_len during setup. This makes
> pkts greater than (MTU - ETH_HLEN) could not be xmited. Fix it by
> subtracting the ETHER tunnel devices' dev->hard_header_len for MTU
> calculation.
> 
> Fixes: 28e104d00281 ("net: ip_tunnel: fix mtu calculation")
> Reported-by: Jianlin Shi <jishi@xxxxxxxxxx>
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
> ---
>  net/ipv4/ip_tunnel.c | 22 ++++++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)

Applied, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux