Commit 901d6cc4 authored by James Morris's avatar James Morris

[IPV4]: Choose new rt_hash_rnd every rt_run_flush.

parent 8ea7b479
...@@ -508,6 +508,8 @@ static void SMP_TIMER_NAME(rt_run_flush)(unsigned long dummy) ...@@ -508,6 +508,8 @@ static void SMP_TIMER_NAME(rt_run_flush)(unsigned long dummy)
rt_deadline = 0; rt_deadline = 0;
get_random_bytes(&rt_hash_rnd, 4);
for (i = rt_hash_mask; i >= 0; i--) { for (i = rt_hash_mask; i >= 0; i--) {
spin_lock_bh(&rt_hash_table[i].lock); spin_lock_bh(&rt_hash_table[i].lock);
rth = rt_hash_table[i].chain; rth = rt_hash_table[i].chain;
...@@ -570,7 +572,6 @@ static void rt_secret_rebuild(unsigned long dummy) ...@@ -570,7 +572,6 @@ static void rt_secret_rebuild(unsigned long dummy)
{ {
unsigned long now = jiffies; unsigned long now = jiffies;
get_random_bytes(&rt_hash_rnd, 4);
rt_cache_flush(0); rt_cache_flush(0);
mod_timer(&rt_secret_timer, now + ip_rt_secret_interval); mod_timer(&rt_secret_timer, now + ip_rt_secret_interval);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment