From: Stephen Hemminger <shemminger@vyatta.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [RFC] MTU discovery not working over GRE
Date: Fri, 4 May 2012 14:04:53 -0700 [thread overview]
Message-ID: <20120504140453.452794c4@nehalam.linuxnetplumber.net> (raw)
When using gretap, I am seeing that Path MTU discovery is not
working for packets going out over the tunnel interface. What happens
is that the driver correctly identifies the DF bit, and see IPv4
but since skb_dst(skb) is NULL, the icmp_send() ends up doing nothing.
The following fixes the problem but does not seem like the correct general
solution. IPv6 almost certainly has the same problem.
Perhaps we should just set the skb_dst() earlier (before the
MTU checks).
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 1017460..da57bb0 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -838,8 +838,9 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
if ((old_iph->frag_off&htons(IP_DF)) &&
mtu < ntohs(old_iph->tot_len)) {
+ skb_dst_drop(skb);
+ skb_dst_set(skb, &rt->dst);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
- ip_rt_put(rt);
goto tx_error;
}
}
reply other threads:[~2012-05-04 21:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120504140453.452794c4@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox