From: Tom Goff Date: Fri, 14 Aug 2009 23:33:56 +0000 (-0700) Subject: gre: Fix MTU calculation for bound GRE tunnels X-Git-Tag: v2.6.30.7~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f94cae4285c03f8060daaabd77809793924c6100;p=thirdparty%2Fkernel%2Fstable.git gre: Fix MTU calculation for bound GRE tunnels [ Upstream commit 8cdb045632e5ee22854538619ac6f150eb0a4894 ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index e62510d5ea5a6..3491c93fb449b 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -952,7 +952,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;