Patchwork [2/2] ipv4: Don't update the pmtu on mtu locked routes

login
register
mail settings
Submitter Steffen Klassert
Date Jan. 17, 2013, 6:58 a.m.
Message ID <20130117065810.GH18940@secunet.com>
Download mbox | patch
Permalink /patch/213148/
State Accepted
Delegated to: David Miller
Headers show

Comments

Steffen Klassert - Jan. 17, 2013, 6:58 a.m.
Routes with locked mtu should not use learned pmtu informations,
so do not update the pmtu on these routes.

Reported-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/ipv4/route.c |    3 +++
 1 file changed, 3 insertions(+)
David Miller - Jan. 17, 2013, 8:40 a.m.
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 17 Jan 2013 07:58:10 +0100

> Routes with locked mtu should not use learned pmtu informations,
> so do not update the pmtu on these routes.
> 
> Reported-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>

Applied and queued up for -stable.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julian Anastasov - Jan. 17, 2013, 8:41 a.m.
Hello,

On Thu, 17 Jan 2013, Steffen Klassert wrote:

> Routes with locked mtu should not use learned pmtu informations,
> so do not update the pmtu on these routes.
> 
> Reported-by: Julian Anastasov <ja@ssi.bg>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
> ---
>  net/ipv4/route.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 6e4a89c..259cbee 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -912,6 +912,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_metric_locked(dst, RTAX_MTU))
> +		return;
> +
>  	if (dst->dev->mtu < mtu)
>  		return;
>  
> -- 
> 1.7.9.5

	Thanks

--
Julian Anastasov <ja@ssi.bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 6e4a89c..259cbee 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -912,6 +912,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_metric_locked(dst, RTAX_MTU))
+		return;
+
 	if (dst->dev->mtu < mtu)
 		return;