Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix build when IPSEC enabled.
details: https://anonhg.NetBSD.org/src/rev/fbb49eb7dce3
branches: trunk
changeset: 344876:fbb49eb7dce3
user: rjs <rjs%NetBSD.org@localhost>
date: Mon Apr 25 21:21:02 2016 +0000
description:
Fix build when IPSEC enabled.
diffstat:
sys/netinet/sctp_indata.c | 8 ++++----
sys/netinet/sctp_input.c | 13 +++++++------
sys/netinet/sctp_output.c | 8 ++++----
sys/netinet/sctp_pcb.c | 8 ++++----
sys/netinet/sctp_peeloff.c | 8 ++++----
sys/netinet/sctp_structs.h | 6 +++---
sys/netinet/sctp_timer.c | 8 ++++----
sys/netinet/sctp_usrreq.c | 8 ++++----
sys/netinet6/sctp6_usrreq.c | 17 +++++++----------
9 files changed, 41 insertions(+), 43 deletions(-)
diffs (289 lines):
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_indata.c
--- a/sys/netinet/sctp_indata.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_indata.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sctp_indata.c,v 1.3 2016/02/15 19:00:42 rtr Exp $ */
+/* $NetBSD: sctp_indata.c,v 1.4 2016/04/25 21:21:02 rjs Exp $ */
/* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_indata.c,v 1.3 2016/02/15 19:00:42 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_indata.c,v 1.4 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -83,8 +83,8 @@
#include <netinet/sctp_uio.h>
#include <netinet/sctp_timer.h>
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif /*IPSEC*/
#include <net/net_osdep.h>
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_input.c
--- a/sys/netinet/sctp_input.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_input.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,5 +1,5 @@
/* $KAME: sctp_input.c,v 1.28 2005/04/21 18:36:21 nishida Exp $ */
-/* $NetBSD: sctp_input.c,v 1.1 2015/10/13 21:28:35 rjs Exp $ */
+/* $NetBSD: sctp_input.c,v 1.2 2016/04/25 21:21:02 rjs Exp $ */
/*
* Copyright (C) 2002, 2003, 2004 Cisco Systems Inc,
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_input.c,v 1.1 2015/10/13 21:28:35 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_input.c,v 1.2 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -84,8 +84,8 @@
#include <netinet/sctp_asconf.h>
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif /*IPSEC*/
#include <net/net_osdep.h>
@@ -4237,9 +4237,10 @@
* I very much doubt any of the IPSEC stuff will work but I have
* no idea, so I will leave it in place.
*/
-
- if (ipsec4_in_reject_so(m, inp->ip_inp.inp.inp_socket)) {
+ if (ipsec_used && ipsec4_in_reject_so(m, inp->ip_inp.inp.inp_socket)) {
+#if 0
ipsecstat.in_polvio++;
+#endif
sctp_pegs[SCTP_HDR_DROPS]++;
goto bad;
}
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_output.c
--- a/sys/netinet/sctp_output.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_output.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sctp_output.c,v 1.2 2016/04/03 09:57:40 mlelstv Exp $ */
+/* $NetBSD: sctp_output.c,v 1.3 2016/04/25 21:21:02 rjs Exp $ */
/* $KAME: sctp_output.c,v 1.48 2005/06/16 18:29:24 jinmei Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.2 2016/04/03 09:57:40 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.3 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -93,8 +93,8 @@
#include <netinet/sctp_pcb.h>
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif /* IPSEC */
#include <netinet/sctp_var.h>
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_pcb.c
--- a/sys/netinet/sctp_pcb.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_pcb.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,5 +1,5 @@
/* $KAME: sctp_pcb.c,v 1.39 2005/06/16 18:29:25 jinmei Exp $ */
-/* $NetBSD: sctp_pcb.c,v 1.3 2016/04/14 18:36:56 rjs Exp $ */
+/* $NetBSD: sctp_pcb.c,v 1.4 2016/04/25 21:21:02 rjs Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_pcb.c,v 1.3 2016/04/14 18:36:56 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_pcb.c,v 1.4 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -76,8 +76,8 @@
#endif /* INET6 */
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif /* IPSEC */
#include <netinet/sctp_var.h>
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_peeloff.c
--- a/sys/netinet/sctp_peeloff.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_peeloff.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,5 +1,5 @@
/* $KAME: sctp_peeloff.c,v 1.13 2005/03/06 16:04:18 itojun Exp $ */
-/* $NetBSD: sctp_peeloff.c,v 1.1 2015/10/13 21:28:35 rjs Exp $ */
+/* $NetBSD: sctp_peeloff.c,v 1.2 2016/04/25 21:21:02 rjs Exp $ */
/*
* Copyright (C) 2002, 2003 Cisco Systems Inc,
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_peeloff.c,v 1.1 2015/10/13 21:28:35 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_peeloff.c,v 1.2 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -74,8 +74,8 @@
#include <netinet/sctputil.h>
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif /*IPSEC*/
#ifdef SCTP_DEBUG
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_structs.h
--- a/sys/netinet/sctp_structs.h Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_structs.h Mon Apr 25 21:21:02 2016 +0000
@@ -1,5 +1,5 @@
/* $KAME: sctp_structs.h,v 1.13 2005/03/06 16:04:18 itojun Exp $ */
-/* $NetBSD: sctp_structs.h,v 1.1 2015/10/13 21:28:35 rjs Exp $ */
+/* $NetBSD: sctp_structs.h,v 1.2 2016/04/25 21:21:02 rjs Exp $ */
#ifndef __SCTP_STRUCTS_H__
#define __SCTP_STRUCTS_H__
@@ -40,8 +40,8 @@
#include <sys/callout.h>
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif
#include <netinet/sctp_header.h>
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_timer.c
--- a/sys/netinet/sctp_timer.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_timer.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,5 +1,5 @@
/* $KAME: sctp_timer.c,v 1.30 2005/06/16 18:29:25 jinmei Exp $ */
-/* $NetBSD: sctp_timer.c,v 1.1 2015/10/13 21:28:35 rjs Exp $ */
+/* $NetBSD: sctp_timer.c,v 1.2 2016/04/25 21:21:02 rjs Exp $ */
/*
* Copyright (C) 2002, 2003, 2004 Cisco Systems Inc,
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_timer.c,v 1.1 2015/10/13 21:28:35 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_timer.c,v 1.2 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -73,8 +73,8 @@
#include <netinet/sctp_pcb.h>
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif /* IPSEC */
#ifdef INET6
#include <netinet6/sctp6_var.h>
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet/sctp_usrreq.c
--- a/sys/netinet/sctp_usrreq.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet/sctp_usrreq.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,5 +1,5 @@
/* $KAME: sctp_usrreq.c,v 1.50 2005/06/16 20:45:29 jinmei Exp $ */
-/* $NetBSD: sctp_usrreq.c,v 1.3 2016/04/03 09:57:40 mlelstv Exp $ */
+/* $NetBSD: sctp_usrreq.c,v 1.4 2016/04/25 21:21:02 rjs Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.3 2016/04/03 09:57:40 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.4 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -78,8 +78,8 @@
#include <netinet/sctp_indata.h>
#include <netinet/sctp_asconf.h>
#ifdef IPSEC
-#include <netinet6/ipsec.h>
-#include <netkey/key.h>
+#include <netipsec/ipsec.h>
+#include <netipsec/key.h>
#endif /* IPSEC */
#include <net/net_osdep.h>
diff -r b51e09b35aa2 -r fbb49eb7dce3 sys/netinet6/sctp6_usrreq.c
--- a/sys/netinet6/sctp6_usrreq.c Mon Apr 25 20:15:46 2016 +0000
+++ b/sys/netinet6/sctp6_usrreq.c Mon Apr 25 21:21:02 2016 +0000
@@ -1,5 +1,5 @@
/* $KAME: sctp6_usrreq.c,v 1.38 2005/08/24 08:08:56 suz Exp $ */
-/* $NetBSD: sctp6_usrreq.c,v 1.3 2016/01/21 15:41:30 riastradh Exp $ */
+/* $NetBSD: sctp6_usrreq.c,v 1.4 2016/04/25 21:21:02 rjs Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp6_usrreq.c,v 1.3 2016/01/21 15:41:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sctp6_usrreq.c,v 1.4 2016/04/25 21:21:02 rjs Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -81,11 +81,8 @@
#include <netinet6/nd6.h>
#ifdef IPSEC
-#ifndef __OpenBSD__
-#include <netinet6/ipsec.h>
-#else
-#undef IPSEC
-#endif
+#include <netipsec/ipsec.h>
+#include <netipsec/ipsec6.h>
#endif /*IPSEC*/
#if defined(NFAITH) && NFAITH > 0
@@ -240,10 +237,10 @@
/*
* Check AH/ESP integrity.
*/
- if (ipsec6_in_reject_so(m, in6p->sctp_socket)) {
+ if (ipsec_used && ipsec6_in_reject_so(m, in6p->sctp_socket)) {
/* XXX */
-#ifndef __APPLE__
- /* FIX ME: need to find right stat for __APPLE__ */
+#if 0
+ /* FIX ME: need to find right stat */
ipsec6stat.in_polvio++;
#endif
goto bad;
Home |
Main Index |
Thread Index |
Old Index