Fix build when IPSEC enabled.
This commit is contained in:
parent
175648e95c
commit
505ea9765f
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_indata.c,v 1.3 2016/02/15 19:00:42 rtr Exp $");
|
||||
#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>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_input.c,v 1.1 2015/10/13 21:28:35 rjs Exp $");
|
||||
#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 @@ sctp_input(struct mbuf *m, ...)
|
||||
* 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;
|
||||
}
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.2 2016/04/03 09:57:40 mlelstv Exp
|
||||
#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>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_pcb.c,v 1.3 2016/04/14 18:36:56 rjs Exp $");
|
||||
#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>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_peeloff.c,v 1.1 2015/10/13 21:28:35 rjs Exp $")
|
||||
#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
|
||||
|
@ -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>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_timer.c,v 1.1 2015/10/13 21:28:35 rjs Exp $");
|
||||
#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>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.3 2016/04/03 09:57:40 mlelstv Exp
|
||||
#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>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sctp6_usrreq.c,v 1.3 2016/01/21 15:41:30 riastradh E
|
||||
#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 @@ sctp_skip_csum:
|
||||
/*
|
||||
* 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;
|
||||
|
Loading…
Reference in New Issue
Block a user