periodically rehash table, why?
Subsystems (2)
Hi,
in nl_pid_hash_dilute() there is:
if (unlikely(avg > 1) && nl_pid_hash_rehash(hash, 1))
return 1; if (unlikely(len > avg) && time_after(jiffies, hash->rehash_time)) {
nl_pid_hash_rehash(hash, 0);
return 1;
}I don't see a reason why periodically rehashing might help in any way (without resizing). Is there a reason for that?
Thanks. /holger
Quoted 6 lines · Holger Eitzenberger
in
nl_pid_hash_dilute()there is:if (unlikely(avg > 1) && nl_pid_hash_rehash(hash, 1)) return 1;
Quoted 7 lines
if (unlikely(len > avg) && time_after(jiffies, hash->rehash_time)) { nl_pid_hash_rehash(hash, 0); return 1; }I don't see a reason why periodically rehashing might help in any way (without resizing). Is there a reason for that?
It's to prevent attackers from guessing the hash secret and causing hash chains to grow excessively.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt