1 From foo@baz Wed Mar 19 23:28:23 Local time zone must be set--see zic manual page 2014
2 From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
3 Date: Thu, 27 Feb 2014 17:14:41 +0800
4 Subject: neigh: recompute reachabletime before returning from neigh_periodic_work()
6 From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
8 [ Upstream commit feff9ab2e7fa773b6a3965f77375fe89f7fd85cf ]
10 If the neigh table's entries is less than gc_thresh1, the function
11 will return directly, and the reachabletime will not be recompute,
12 so the reachabletime can be guessed.
14 Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 net/core/neighbour.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
21 --- a/net/core/neighbour.c
22 +++ b/net/core/neighbour.c
23 @@ -764,9 +764,6 @@ static void neigh_periodic_work(struct w
24 nht = rcu_dereference_protected(tbl->nht,
25 lockdep_is_held(&tbl->lock));
27 - if (atomic_read(&tbl->entries) < tbl->gc_thresh1)
31 * periodically recompute ReachableTime from random function
33 @@ -779,6 +776,9 @@ static void neigh_periodic_work(struct w
34 neigh_rand_reach_time(p->base_reachable_time);
37 + if (atomic_read(&tbl->entries) < tbl->gc_thresh1)
40 for (i = 0 ; i < (1 << nht->hash_shift); i++) {
41 np = &nht->hash_buckets[i];