Skip to content

Commit

Permalink
ndisc: Do not try to update "updated" time if neighbour has already g…
Browse files Browse the repository at this point in the history
…one.

Commit 2152cae ("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 <dan.carpenter@oracle.com>

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki / 吉藤英明 authored and David S. Miller committed Jan 21, 2013
1 parent 1002041 commit b820bb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b820bb6

Please sign in to comment.