Commit 8cdb045632e5ee22854538619ac6f150eb0a4894

Authored by Tom Goff
Committed by David S. Miller
1 parent 7c1d15d736

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 42aa916265d740d66ac1f17290366e9494c884c2
("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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -951,7 +951,7 @@
951 951 addend += 4;
952 952 }
953 953 dev->needed_headroom = addend + hlen;
954   - mtu -= dev->hard_header_len - addend;
  954 + mtu -= dev->hard_header_len + addend;
955 955  
956 956 if (mtu < 68)
957 957 mtu = 68;