This is a note to let you know that I've just added the patch titled

    ipv4: Don't report stale pmtu values to userspace

to the 3.6-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ipv4-don-t-report-stale-pmtu-values-to-userspace.patch
and it can be found in the queue-3.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 26b59d48e8de1d793e3b8aefc4d2a81b59feece7 Mon Sep 17 00:00:00 2001
From: Steffen Klassert <[email protected]>
Date: Mon, 8 Oct 2012 00:56:54 +0000
Subject: ipv4: Don't report stale pmtu values to userspace


From: Steffen Klassert <[email protected]>

[ Upstream commit ee9a8f7ab2edf801b8b514c310455c94acc232f6 ]

We report cached pmtu values even if they are already expired.
Change this to not report these values after they are expired
and fix a race in the expire time calculation, as suggested by
Eric Dumazet.

Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/ipv4/route.c |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2187,8 +2187,18 @@ static int rt_fill_info(struct net *net,
            nla_put_be32(skb, RTA_GATEWAY, rt->rt_gateway))
                goto nla_put_failure;
 
+       expires = rt->dst.expires;
+       if (expires) {
+               unsigned long now = jiffies;
+
+               if (time_before(now, expires))
+                       expires -= now;
+               else
+                       expires = 0;
+       }
+
        memcpy(metrics, dst_metrics_ptr(&rt->dst), sizeof(metrics));
-       if (rt->rt_pmtu)
+       if (rt->rt_pmtu && expires)
                metrics[RTAX_MTU - 1] = rt->rt_pmtu;
        if (rtnetlink_put_metrics(skb, metrics) < 0)
                goto nla_put_failure;
@@ -2198,13 +2208,6 @@ static int rt_fill_info(struct net *net,
                goto nla_put_failure;
 
        error = rt->dst.error;
-       expires = rt->dst.expires;
-       if (expires) {
-               if (time_before(jiffies, expires))
-                       expires -= jiffies;
-               else
-                       expires = 0;
-       }
 
        if (rt_is_input_route(rt)) {
                if (nla_put_u32(skb, RTA_IIF, rt->rt_iif))


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.6/ipv4-always-invalidate-or-update-the-route-on-pmtu-events.patch
queue-3.6/ipv4-don-t-report-stale-pmtu-values-to-userspace.patch
queue-3.6/ipv4-don-t-create-nh-exeption-when-the-device-mtu-is-smaller-than-the-reported-pmtu.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to