diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2013-07-11 16:12:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-28 19:30:02 -0400 |
commit | 6afbcb59964ec9dc3dd63ed96a9e2cda31f8a072 (patch) | |
tree | 6aa13e211fe1cd87b341bab8069f1c69b7d92c81 | |
parent | f84ddbc58cfd8551757efe3c61242c4d6e9918ce (diff) |
gre: Fix MTU sizing check for gretap tunnels
[ Upstream commit 8c91e162e058bb91b7766f26f4d5823a21941026 ]
This change fixes an MTU sizing issue seen with gretap tunnels when non-gso
packets are sent from the interface.
In my case I was able to reproduce the issue by simply sending a ping of
1421 bytes with the gretap interface created on a device with a standard
1500 mtu.
This fix is based on the fact that the tunnel mtu is already adjusted by
dev->hard_header_len so it would make sense that any packets being compared
against that mtu should also be adjusted by hard_header_len and the tunnel
header instead of just the tunnel header.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Reported-by: Cong Wang <amwang@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/ipv4/ip_tunnel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index d05bd02886ed..cbfc37f5f05a 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c | |||
@@ -490,7 +490,7 @@ static int tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb, | |||
490 | struct rtable *rt, __be16 df) | 490 | struct rtable *rt, __be16 df) |
491 | { | 491 | { |
492 | struct ip_tunnel *tunnel = netdev_priv(dev); | 492 | struct ip_tunnel *tunnel = netdev_priv(dev); |
493 | int pkt_size = skb->len - tunnel->hlen; | 493 | int pkt_size = skb->len - tunnel->hlen - dev->hard_header_len; |
494 | int mtu; | 494 | int mtu; |
495 | 495 | ||
496 | if (df) | 496 | if (df) |