From: Martin KaFai Lau <kafai@fb.com>
To: netdev <netdev@vger.kernel.org>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>,
Steffen Klassert <steffen.klassert@secunet.com>,
David Miller <davem@davemloft.net>,
Yang Yingliang <yangyingliang@huawei.com>,
shengyong <shengyong1@huawei.com>,
Kernel Team <Kernel-team@fb.com>
Subject: [PATCH net-next 3/5] ipv6: Stop /128 route from disappearing after pmtu update
Date: Tue, 28 Apr 2015 13:03:05 -0700 [thread overview]
Message-ID: <1430251387-2942539-4-git-send-email-kafai@fb.com> (raw)
In-Reply-To: <1430251387-2942539-1-git-send-email-kafai@fb.com>
This patch is mostly from Steffen Klassert <steffen.klassert@secunet.com>.
I only removed the (rt6->rt6i_dst.plen == 128) check from
ip6_rt_update_pmtu() because the (rt6->rt6i_flags & RTF_CACHE) test
has already implied it.
This patch:
1. Create RTF_CACHE route for /128 non local route
2. After (1), all routes that allow pmtu update should have a RTF_CACHE
clone. Hence, stop updating MTU for any non RTF_CACHE route.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/ipv6/route.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 07562a2..aa4cfdd 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -977,7 +977,7 @@ redo_rt6_select:
if (!(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_GATEWAY)))
nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
- else if (!(rt->dst.flags & DST_HOST))
+ else if (!(rt->dst.flags & DST_HOST) || !(rt->dst.flags & RTF_LOCAL))
nrt = rt6_alloc_clone(rt, &fl6->daddr);
else
goto out2;
@@ -1172,7 +1172,7 @@ 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_flags & RTF_CACHE)) {
struct net *net = dev_net(dst->dev);
rt6->rt6i_flags |= RTF_MODIFIED;
--
1.8.1
next prev parent reply other threads:[~2015-04-28 20:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 20:03 [PATCH net-next 0/5] ipv6: Stop /128 route from disappearing after pmtu update Martin KaFai Lau
2015-04-28 20:03 ` [PATCH net-next 1/5] ipv6: Consider RTF_CACHE when searching the fib6 tree Martin KaFai Lau
2015-04-28 20:03 ` [PATCH net-next 2/5] ipv6: Extend the route lookups to low priority metrics Martin KaFai Lau
2015-04-28 20:03 ` Martin KaFai Lau [this message]
2015-05-02 22:41 ` [PATCH net-next 3/5] ipv6: Stop /128 route from disappearing after pmtu update Hajime Tazaki
2015-05-02 23:20 ` Martin KaFai Lau
2015-05-03 0:19 ` Hajime Tazaki
2015-05-03 1:00 ` Martin KaFai Lau
2015-05-03 1:03 ` Martin KaFai Lau
2015-05-03 14:26 ` Hajime Tazaki
2015-05-03 3:38 ` Martin KaFai Lau
2015-05-03 14:29 ` Hajime Tazaki
2015-05-03 19:01 ` Martin KaFai Lau
2015-05-04 0:29 ` Martin KaFai Lau
2015-05-04 1:11 ` Hajime Tazaki
2015-04-28 20:03 ` [PATCH net-next 4/5] ipv6: Stop rt6_info from using inet_peer's metrics Martin KaFai Lau
2015-04-28 20:03 ` [PATCH net-next 5/5] ipv6: Remove DST_METRICS_FORCE_OVERWRITE and _rt6i_peer Martin KaFai Lau
2015-05-02 1:01 ` [PATCH net-next 0/5] ipv6: Stop /128 route from disappearing after pmtu update 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=1430251387-2942539-4-git-send-email-kafai@fb.com \
--to=kafai@fb.com \
--cc=Kernel-team@fb.com \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=shengyong1@huawei.com \
--cc=steffen.klassert@secunet.com \
--cc=yangyingliang@huawei.com \
/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).