Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: ip_tunnel: fix mtu calculation for ETHER tunnel devices
Commit 28e104d ("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: 28e104d ("net: ip_tunnel: fix mtu calculation") Reported-by: Jianlin Shi <[email protected]> Signed-off-by: Hangbin Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information