From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 2/3] ipv4: Don't create nh exeption when the device mtu is smaller than the reported pmtu
Date: Mon, 8 Oct 2012 10:48:18 +0200 [thread overview]
Message-ID: <20121008084818.GD15622@secunet.com> (raw)
In-Reply-To: <20121008084642.GB15622@secunet.com>
When a local tool like tracepath tries to send packets bigger than
the device mtu, we create a nh exeption and set the pmtu to device
mtu. The device mtu does not expire, so check if the device mtu is
smaller than the reported pmtu and don't crerate a nh exeption in
that case.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv4/route.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 90ba835..741df67 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -909,6 +909,9 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)
struct dst_entry *dst = &rt->dst;
struct fib_result res;
+ if (dst->dev->mtu < mtu)
+ return;
+
if (mtu < ip_rt_min_pmtu)
mtu = ip_rt_min_pmtu;
--
1.7.0.4
next prev parent reply other threads:[~2012-10-08 8:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 8:46 [PATCH 0/3] ipv4: pmtu fixes Steffen Klassert
2012-10-08 8:47 ` [PATCH 1/3] ipv4: Always invalidate or update the route on pmtu events Steffen Klassert
2012-10-08 8:48 ` Steffen Klassert [this message]
2012-10-08 8:48 ` [PATCH 3/3] ipv4: Don't report stale pmtu values to userspace Steffen Klassert
2012-10-08 9:55 ` Eric Dumazet
2012-10-08 10:38 ` Steffen Klassert
2012-10-08 10:56 ` [PATCH v2 " Steffen Klassert
2012-10-08 18:47 ` [PATCH 0/3] ipv4: pmtu fixes David Miller
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=20121008084818.GD15622@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--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;
as well as URLs for NNTP newsgroup(s).