Module Name:    src
Committed By:   riz
Date:           Mon Sep  3 19:19:55 UTC 2012

Modified Files:
        src/sys/netipsec [netbsd-6]: key.c key.h

Log Message:
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...


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.76.2.1 src/sys/netipsec/key.c
cvs rdiff -u -r1.11 -r1.11.8.1 src/sys/netipsec/key.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netipsec/key.c
diff -u src/sys/netipsec/key.c:1.76 src/sys/netipsec/key.c:1.76.2.1
--- src/sys/netipsec/key.c:1.76	Mon Jan  9 15:42:08 2012
+++ src/sys/netipsec/key.c	Mon Sep  3 19:19:54 2012
@@ -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 int key_prefered_oldsa = 0;	/* pr
 
 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 @@ key_do_init(void)
 #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*/

Index: src/sys/netipsec/key.h
diff -u src/sys/netipsec/key.h:1.11 src/sys/netipsec/key.h:1.11.8.1
--- src/sys/netipsec/key.h:1.11	Thu Jun  9 19:54:18 2011
+++ src/sys/netipsec/key.h	Mon Sep  3 19:19:55 2012
@@ -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 @@ u_int16_t key_portfromsaddr (const union
 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_ */

Reply via email to