diff options
author | Tom Goff <thomas.goff@boeing.com> | 2009-08-14 16:33:56 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 16:41:18 -0700 |
commit | 8cdb045632e5ee22854538619ac6f150eb0a4894 (patch) | |
tree | ece387e77861a103ca6cc5b7d501e4c69a0399dc /net | |
parent | 7c1d15d736687057f4dc6e51fbf44b6f6e4320cb (diff) | |
download | linux-3.10-8cdb045632e5ee22854538619ac6f150eb0a4894.tar.gz linux-3.10-8cdb045632e5ee22854538619ac6f150eb0a4894.tar.bz2 linux-3.10-8cdb045632e5ee22854538619ac6f150eb0a4894.zip |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_gre.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index cb4a0f4bd5e..82c11dd10a6 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -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; |