[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150330103439.GL3311@secunet.com>
Date: Mon, 30 Mar 2015 12:34:40 +0200
From: Steffen Klassert <steffen.klassert@...unet.com>
To: shengyong <shengyong1@...wei.com>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<yangyingliang@...wei.com>, <hannes@...hat.com>
Subject: [PATCH RFC 3/3] ipv6: Don't update pmtu on uncached routes.
A pmtu update on an uncached route will delete the
original route after expiration time is elapsed.
As a result, the host is not reachable any more.
All routes where pmtu discovery can happen are
cached now, so it is ok to refuse pmtu updates
on uncached routes.
Signed-off-by: Steffen Klassert <steffen.klassert@...unet.com>
---
net/ipv6/route.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e4b24c8..e0c6ac9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1174,7 +1174,8 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
struct rt6_info *rt6 = (struct rt6_info *)dst;
dst_confirm(dst);
- if (mtu < dst_mtu(dst) && rt6->rt6i_dst.plen == 128) {
+ if (mtu < dst_mtu(dst) && rt6->rt6i_dst.plen == 128 &&
+ (rt6->rt6i_flags & RTF_CACHE)) {
struct net *net = dev_net(dst->dev);
rt6->rt6i_flags |= RTF_MODIFIED;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists