All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ipv6: add mtu lock check in __ip6_rt_update_pmtu
@ 2016-10-28 10:18 Xin Long
  2016-10-31 18:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Xin Long @ 2016-10-28 10:18 UTC (permalink / raw)
  To: network dev; +Cc: davem, hannes

Prior to this patch, ipv6 didn't do mtu lock check in ip6_update_pmtu.
It leaded to that mtu lock doesn't really work when receiving the pkt
of ICMPV6_PKT_TOOBIG.

This patch is to add mtu lock check in __ip6_rt_update_pmtu just as ipv4
did in __ip_rt_update_pmtu.

Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 net/ipv6/route.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 947ed1d..7403d90 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1364,6 +1364,9 @@ static void __ip6_rt_update_pmtu(struct dst_entry *dst, const struct sock *sk,
 	if (rt6->rt6i_flags & RTF_LOCAL)
 		return;
 
+	if (dst_metric_locked(dst, RTAX_MTU))
+		return;
+
 	dst_confirm(dst);
 	mtu = max_t(u32, mtu, IPV6_MIN_MTU);
 	if (mtu >= dst_mtu(dst))
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] ipv6: add mtu lock check in __ip6_rt_update_pmtu
  2016-10-28 10:18 [PATCH net] ipv6: add mtu lock check in __ip6_rt_update_pmtu Xin Long
@ 2016-10-31 18:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-31 18:25 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev, hannes

From: Xin Long <lucien.xin@gmail.com>
Date: Fri, 28 Oct 2016 18:18:01 +0800

> Prior to this patch, ipv6 didn't do mtu lock check in ip6_update_pmtu.
> It leaded to that mtu lock doesn't really work when receiving the pkt
> of ICMPV6_PKT_TOOBIG.
> 
> This patch is to add mtu lock check in __ip6_rt_update_pmtu just as ipv4
> did in __ip_rt_update_pmtu.
> 
> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-31 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 10:18 [PATCH net] ipv6: add mtu lock check in __ip6_rt_update_pmtu Xin Long
2016-10-31 18:25 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.