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 42aa916265
("gre: Move MTU setting out of ipgre_tunnel_bind_dev").

Signed-off-by: Tom Goff <thomas.goff@boeing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tom Goff 2009-08-14 16:33:56 -07:00 коммит произвёл David S. Miller
Родитель 7c1d15d736
Коммит 8cdb045632
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;