Commit 8cdb0456 authored by Tom Goff's avatar Tom Goff Committed by David S. Miller
Browse files

gre: Fix MTU calculation for bound GRE tunnels

The GRE header length should be subtracted when the tunnel MTU is
calculated.  This just corrects for the associativity change
introduced by commit 42aa9162

("gre: Move MTU setting out of ipgre_tunnel_bind_dev").

Signed-off-by: default avatarTom Goff <>
Signed-off-by: default avatarDavid S. Miller <>
parent 7c1d15d7
......@@ -951,7 +951,7 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev)
addend += 4;
dev->needed_headroom = addend + hlen;
mtu -= dev->hard_header_len - addend;
mtu -= dev->hard_header_len + addend;
if (mtu < 68)
mtu = 68;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment