Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netkey use prime number to hash SPI



details:   https://anonhg.NetBSD.org/src/rev/cd6414b1da7e
branches:  trunk
changeset: 551918:cd6414b1da7e
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Sep 14 03:11:31 2003 +0000

description:
use prime number to hash SPI

diffstat:

 sys/netkey/key.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f0588d94e1a5 -r cd6414b1da7e sys/netkey/key.c
--- a/sys/netkey/key.c  Sun Sep 14 01:14:54 2003 +0000
+++ b/sys/netkey/key.c  Sun Sep 14 03:11:31 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: key.c,v 1.97 2003/09/12 11:09:32 itojun Exp $  */
+/*     $NetBSD: key.c,v 1.98 2003/09/14 03:11:31 itojun Exp $  */
 /*     $KAME: key.c,v 1.310 2003/09/08 02:23:44 itojun Exp $   */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.97 2003/09/12 11:09:32 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.98 2003/09/14 03:11:31 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -147,7 +147,7 @@
 static LIST_HEAD(_regtree, secreg) regtree[SADB_SATYPE_MAX + 1];
                                                        /* registed list */
 
-#define SPIHASHSIZE    128
+#define SPIHASHSIZE    131     /* prime */
 static LIST_HEAD(_spihash, secasvar) spihash[SPIHASHSIZE];
 
 #ifndef IPSEC_NONBLOCK_ACQUIRE



Home | Main Index | Thread Index | Old Index