diff options
author | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> | 2013-01-21 04:58:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-21 15:41:41 -0500 |
commit | b820bb6b996966d93a5442b5fbf803ea58e7f487 (patch) | |
tree | 0abfaaf1cc30ca925fef15d755296ef1f3b24651 /net | |
parent | 100204147be9a2b87be2b118959b12eeaf8ef5d0 (diff) |
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 <dan.carpenter@oracle.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 2d94d5a7a051..f3328bc1174f 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -492,10 +492,10 @@ static void rt6_probe(struct rt6_info *rt) | |||
492 | struct in6_addr mcaddr; | 492 | struct in6_addr mcaddr; |
493 | struct in6_addr *target; | 493 | struct in6_addr *target; |
494 | 494 | ||
495 | neigh->updated = jiffies; | 495 | if (neigh) { |
496 | 496 | neigh->updated = jiffies; | |
497 | if (neigh) | ||
498 | write_unlock(&neigh->lock); | 497 | write_unlock(&neigh->lock); |
498 | } | ||
499 | 499 | ||
500 | target = (struct in6_addr *)&rt->rt6i_gateway; | 500 | target = (struct in6_addr *)&rt->rt6i_gateway; |
501 | addrconf_addr_solict_mult(target, &mcaddr); | 501 | addrconf_addr_solict_mult(target, &mcaddr); |