Source-Changes-HG archive

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

[src/trunk]: src/sys/netkey splsoftnet in key_setspi



details:   https://anonhg.NetBSD.org/src/rev/968f8ff71100
branches:  trunk
changeset: 551543:968f8ff71100
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Sep 08 01:55:09 2003 +0000

description:
splsoftnet in key_setspi

diffstat:

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

diffs (34 lines):

diff -r 0fd784638ab6 -r 968f8ff71100 sys/netkey/key.c
--- a/sys/netkey/key.c  Mon Sep 08 01:27:08 2003 +0000
+++ b/sys/netkey/key.c  Mon Sep 08 01:55:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: key.c,v 1.91 2003/09/07 20:41:27 itojun Exp $  */
+/*     $NetBSD: key.c,v 1.92 2003/09/08 01:55:09 itojun Exp $  */
 /*     $KAME: key.c,v 1.308 2003/09/07 20:35:59 itojun Exp $   */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.91 2003/09/07 20:41:27 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.92 2003/09/08 01:55:09 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -2672,11 +2672,14 @@
        struct secasvar *sav;
        u_int32_t spi;
 {
-
+       int s;
+
+       s = splsoftnet();
        sav->spi = spi;
        if (sav->spihash.le_prev || sav->spihash.le_next)
                LIST_REMOVE(sav, spihash);
        LIST_INSERT_HEAD(&spihash[spi % SPIHASHSIZE], sav, spihash);
+       splx(s);
 }
 
 /*



Home | Main Index | Thread Index | Old Index