Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/netipsec Apply patch requested by msaitoh in pullup-6...



details:   https://anonhg.NetBSD.org/src/rev/7033b4b335f1
branches:  netbsd-6
changeset: 774582:7033b4b335f1
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Sep 03 19:19:54 2012 +0000

description:
Apply patch requested by msaitoh in pullup-6 ticket #538:

* add TAILQ satailq and sptailq
  - these queues are referenced from kernfs/ipsecsa, kernfs/ipsecsp
    as a weak_symbol.
  - KAME netkey has the two queues, but FAST-IPsec netkey doen't.
    This cause a panic. To prevent this panic, make a empty tailq.
  - The tailq doen't work, because there are no implementation yet...

diffstat:

 sys/netipsec/key.c |  11 +++++++++--
 sys/netipsec/key.h |   6 +++++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diffs (58 lines):

diff -r 345ec60cfd4f -r 7033b4b335f1 sys/netipsec/key.c
--- a/sys/netipsec/key.c        Mon Sep 03 19:15:54 2012 +0000
+++ b/sys/netipsec/key.c        Mon Sep 03 19:19:54 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: key.c,v 1.76 2012/01/09 15:42:08 drochner Exp $        */
+/*     $NetBSD: key.c,v 1.76.2.1 2012/09/03 19:19:54 riz Exp $ */
 /*     $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $        */
 /*     $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $   */
        
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.76 2012/01/09 15:42:08 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.76.2.1 2012/09/03 19:19:54 riz Exp $");
 
 /*
  * This code is referd to RFC 2367
@@ -139,6 +139,10 @@
 
 static u_int32_t acq_seq = 0;
 
+/* XXX: referenced by kernfs, but not implemented... */
+struct _satailq satailq;
+struct _sptailq sptailq;
+
 static LIST_HEAD(_sptree, secpolicy) sptree[IPSEC_DIR_MAX];    /* SPD */
 static LIST_HEAD(_sahtree, secashead) sahtree;                 /* SAD */
 static LIST_HEAD(_regtree, secreg) regtree[SADB_SATYPE_MAX + 1];
@@ -7777,6 +7781,9 @@
 #endif
        LIST_INIT(&spacqtree);
 
+       TAILQ_INIT(&satailq);
+       TAILQ_INIT(&sptailq);
+
        /* system default */
        ip4_def_policy.policy = IPSEC_POLICY_NONE;
        ip4_def_policy.refcnt++;        /*never reclaim this*/
diff -r 345ec60cfd4f -r 7033b4b335f1 sys/netipsec/key.h
--- a/sys/netipsec/key.h        Mon Sep 03 19:15:54 2012 +0000
+++ b/sys/netipsec/key.h        Mon Sep 03 19:19:54 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: key.h,v 1.11 2011/06/09 19:54:18 drochner Exp $        */
+/*     $NetBSD: key.h,v 1.11.8.1 2012/09/03 19:19:55 riz Exp $ */
 /*     $FreeBSD: src/sys/netipsec/key.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $        */
 /*     $KAME: key.h,v 1.21 2001/07/27 03:51:30 itojun Exp $    */
 
@@ -117,5 +117,9 @@
 MALLOC_DECLARE(M_SECA);
 #endif /* MALLOC_DECLARE */
 
+/* XXX: referenced by kernfs, but not implemented... */
+extern TAILQ_HEAD(_satailq, secasvar) satailq;
+extern TAILQ_HEAD(_sptailq, secpolicy) sptailq;
+
 #endif /* defined(_KERNEL) */
 #endif /* !_NETIPSEC_KEY_H_ */



Home | Main Index | Thread Index | Old Index