Skip to contentSkip to conversation

ndisc: Do not try to update "updated" time if neighbour has already gone.

PATCH Applied YOSHIFUJI Hideaki 2 participants 2 messages Jan 21, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ndisc: Do not try to update "updated" time if neighbour has already gone.

Commit 2152caea ("ipv6: Do not depend on rt->n in rt6_probe().") introduce a bug to try to update "updated" time in neighbour structure.
Update the "updated" time only if neighbour is available.

Bug was found by Dan Carpenter <[email protected]>

---
 net/ipv6/route.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
net/ipv6/route.c +3 -3
index 2d94d5a..f3328bc 100644
@@ -492,10 +492,10 @@ static void rt6_probe(struct rt6_info *rt)
 		struct in6_addr mcaddr;
 		struct in6_addr *target;
 
-		neigh->updated = jiffies;
-
-		if (neigh)
+		if (neigh) {
+			neigh->updated = jiffies;
 			write_unlock(&neigh->lock);
+		}
 
 		target = (struct in6_addr *)&rt->rt6i_gateway;
 		addrconf_addr_solict_mult(target, &mcaddr);
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw

From: YOSHIFUJI Hideaki <[email protected]>
Date: Tue, 22 Jan 2013 04:58:50 +0900

Quoted 8 lines

Commit 2152caea ("ipv6: Do not depend on rt->n in rt6_probe().") introduce a bug to try to update "updated" time in neighbour structure.
Update the "updated" time only if neighbour is available.

Bug was found by Dan Carpenter <[email protected]>

Applied, thanks.