提交 8cdb0456 编写于 作者: T Tom Goff 提交者: David S. Miller

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: NTom Goff <thomas.goff@boeing.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册