mac80211: Use correct sign for mesh active path refresh.
authorAndrey Yurovsky <andrey@cozybit.com>
Mon, 10 Aug 2009 19:15:47 +0000 (12:15 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Aug 2009 13:13:59 +0000 (09:13 -0400)
On locally originated traffic, we refresh active paths after a timeout.  The
decision to do this was using the wrong sign and therefore the refresh timer
was triggered for every frame.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mesh_hwmp.c

index b54c21cf5f73cd0a05e132ed0153ed7c28fc86a5..1cd1e72730853062167893c964512537e691353c 100644 (file)
@@ -791,7 +791,7 @@ int mesh_nexthop_lookup(struct sk_buff *skb,
        }
 
        if (mpath->flags & MESH_PATH_ACTIVE) {
-               if (time_after(jiffies, mpath->exp_time -
+               if (time_after(jiffies, mpath->exp_time +
                        msecs_to_jiffies(sdata->u.mesh.mshcfg.path_refresh_time))
                                && !memcmp(sdata->dev->dev_addr, hdr->addr4,
                                           ETH_ALEN)