提交 b820bb6b 编写于 作者: Y YOSHIFUJI Hideaki / 吉藤英明 提交者: David S. Miller

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: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 10020414
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册