[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <E1HRdVX-0003fS-00@gondolin.me.apana.org.au>
Date: Thu, 15 Mar 2007 11:07:51 +1100
From: Herbert Xu <herbert@...dor.apana.org.au>
To: holger@...eitzenberger.de (Holger Eitzenberger)
Cc: netdev@...r.kernel.org
Subject: Re: [NETLINK] periodically rehash table, why?
Holger Eitzenberger <holger@...eitzenberger.de> wrote:
>
> 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?
It's to prevent attackers from guessing the hash secret and causing
hash chains to grow excessively.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists