Mon Mar 30 03:51:50 2015 UTC ()
Tidy up opt_ipsec.h inclusions

Some inclusions of opt_ipsec.h were for IPSEC_NAT_T and are now unnecessary.
Add inclusions to some C files for IPSEC_DEBUG.


(ozaki-r)
diff -r1.32 -r1.33 src/sys/netipsec/ipsec_input.c
diff -r1.40 -r1.41 src/sys/netipsec/ipsec_output.c
diff -r1.13 -r1.14 src/sys/netipsec/key.h
diff -r1.13 -r1.14 src/sys/netipsec/keydb.h
diff -r1.11 -r1.12 src/sys/netipsec/key_debug.c
diff -r1.43 -r1.44 src/sys/netipsec/keysock.c
diff -r1.43 -r1.44 src/sys/netipsec/xform_ah.c
diff -r1.45 -r1.46 src/sys/netipsec/xform_esp.c

cvs diff -r1.32 -r1.33 src/sys/netipsec/ipsec_input.c (expand / switch to unified diff)

--- src/sys/netipsec/ipsec_input.c 2014/03/08 12:18:04 1.32
+++ src/sys/netipsec/ipsec_input.c 2015/03/30 03:51:50 1.33
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $ */ 1/* $NetBSD: ipsec_input.c,v 1.33 2015/03/30 03:51:50 ozaki-r Exp $ */
2/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ 2/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */
3/* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ 3/* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */
4 4
5/* 5/*
6 * The authors of this code are John Ioannidis (ji@tla.org), 6 * The authors of this code are John Ioannidis (ji@tla.org),
7 * Angelos D. Keromytis (kermit@csd.uch.gr) and 7 * Angelos D. Keromytis (kermit@csd.uch.gr) and
8 * Niels Provos (provos@physnet.uni-hamburg.de). 8 * Niels Provos (provos@physnet.uni-hamburg.de).
9 * 9 *
10 * This code was written by John Ioannidis for BSD/OS in Athens, Greece, 10 * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
11 * in November 1995. 11 * in November 1995.
12 * 12 *
13 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996, 13 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
14 * by Angelos D. Keromytis. 14 * by Angelos D. Keromytis.
@@ -29,37 +29,36 @@ @@ -29,37 +29,36 @@
29 * You may use this code under the GNU public license if you so wish. Please 29 * You may use this code under the GNU public license if you so wish. Please
30 * contribute changes back to the authors under this freer than GPL license 30 * contribute changes back to the authors under this freer than GPL license
31 * so that we may further the use of strong encryption without limitations to 31 * so that we may further the use of strong encryption without limitations to
32 * all. 32 * all.
33 * 33 *
34 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 34 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
35 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 35 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
36 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 36 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
37 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 37 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
38 * PURPOSE. 38 * PURPOSE.
39 */ 39 */
40 40
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.32 2014/03/08 12:18:04 ozaki-r Exp $"); 42__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.33 2015/03/30 03:51:50 ozaki-r Exp $");
43 43
44/* 44/*
45 * IPsec input processing. 45 * IPsec input processing.
46 */ 46 */
47 47
48#include "opt_inet.h" 48#include "opt_inet.h"
49#ifdef __FreeBSD__ 49#ifdef __FreeBSD__
50#include "opt_inet6.h" 50#include "opt_inet6.h"
51#endif 51#endif
52#include "opt_ipsec.h" 
53 52
54#include <sys/param.h> 53#include <sys/param.h>
55#include <sys/systm.h> 54#include <sys/systm.h>
56#include <sys/malloc.h> 55#include <sys/malloc.h>
57#include <sys/mbuf.h> 56#include <sys/mbuf.h>
58#include <sys/domain.h> 57#include <sys/domain.h>
59#include <sys/protosw.h> 58#include <sys/protosw.h>
60#include <sys/socket.h> 59#include <sys/socket.h>
61#include <sys/errno.h> 60#include <sys/errno.h>
62#include <sys/syslog.h> 61#include <sys/syslog.h>
63 62
64#include <net/if.h> 63#include <net/if.h>
65#include <net/route.h> 64#include <net/route.h>

cvs diff -r1.40 -r1.41 src/sys/netipsec/ipsec_output.c (expand / switch to unified diff)

--- src/sys/netipsec/ipsec_output.c 2013/11/03 18:37:10 1.40
+++ src/sys/netipsec/ipsec_output.c 2015/03/30 03:51:50 1.41
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ipsec_output.c,v 1.40 2013/11/03 18:37:10 mrg Exp $ */ 1/* $NetBSD: ipsec_output.c,v 1.41 2015/03/30 03:51:50 ozaki-r Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting 4 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -19,36 +19,35 @@ @@ -19,36 +19,35 @@
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 * 27 *
28 * $FreeBSD: /repoman/r/ncvs/src/sys/netipsec/ipsec_output.c,v 1.3.2.2 2003/03/28 20:32:53 sam Exp $ 28 * $FreeBSD: /repoman/r/ncvs/src/sys/netipsec/ipsec_output.c,v 1.3.2.2 2003/03/28 20:32:53 sam Exp $
29 */ 29 */
30 30
31#include <sys/cdefs.h> 31#include <sys/cdefs.h>
32__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.40 2013/11/03 18:37:10 mrg Exp $"); 32__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.41 2015/03/30 03:51:50 ozaki-r Exp $");
33 33
34/* 34/*
35 * IPsec output processing. 35 * IPsec output processing.
36 */ 36 */
37#include "opt_inet.h" 37#include "opt_inet.h"
38#ifdef __FreeBSD__ 38#ifdef __FreeBSD__
39#include "opt_inet6.h" 39#include "opt_inet6.h"
40#endif 40#endif
41#include "opt_ipsec.h" 
42 41
43#include <sys/param.h> 42#include <sys/param.h>
44#include <sys/systm.h> 43#include <sys/systm.h>
45#include <sys/mbuf.h> 44#include <sys/mbuf.h>
46#include <sys/domain.h> 45#include <sys/domain.h>
47#include <sys/protosw.h> 46#include <sys/protosw.h>
48#include <sys/socket.h> 47#include <sys/socket.h>
49#include <sys/errno.h> 48#include <sys/errno.h>
50#include <sys/syslog.h> 49#include <sys/syslog.h>
51 50
52#include <net/if.h> 51#include <net/if.h>
53#include <net/route.h> 52#include <net/route.h>
54 53

cvs diff -r1.13 -r1.14 src/sys/netipsec/key.h (expand / switch to unified diff)

--- src/sys/netipsec/key.h 2014/05/30 01:39:03 1.13
+++ src/sys/netipsec/key.h 2015/03/30 03:51:50 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: key.h,v 1.13 2014/05/30 01:39:03 christos Exp $ */ 1/* $NetBSD: key.h,v 1.14 2015/03/30 03:51:50 ozaki-r Exp $ */
2/* $FreeBSD: src/sys/netipsec/key.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ 2/* $FreeBSD: src/sys/netipsec/key.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
3/* $KAME: key.h,v 1.21 2001/07/27 03:51:30 itojun Exp $ */ 3/* $KAME: key.h,v 1.21 2001/07/27 03:51:30 itojun Exp $ */
4 4
5/* 5/*
6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -26,28 +26,26 @@ @@ -26,28 +26,26 @@
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE. 31 * SUCH DAMAGE.
32 */ 32 */
33 33
34#ifndef _NETIPSEC_KEY_H_ 34#ifndef _NETIPSEC_KEY_H_
35#define _NETIPSEC_KEY_H_ 35#define _NETIPSEC_KEY_H_
36 36
37#ifdef _KERNEL 37#ifdef _KERNEL
38 38
39#include "opt_ipsec.h" 
40 
41struct secpolicy; 39struct secpolicy;
42struct secpolicyindex; 40struct secpolicyindex;
43struct ipsecrequest; 41struct ipsecrequest;
44struct secasvar; 42struct secasvar;
45struct sockaddr; 43struct sockaddr;
46struct socket; 44struct socket;
47struct sadb_msg; 45struct sadb_msg;
48struct sadb_x_policy; 46struct sadb_x_policy;
49struct secasindex; 47struct secasindex;
50union sockaddr_union; 48union sockaddr_union;
51 49
52int key_havesp(u_int dir); 50int key_havesp(u_int dir);
53struct secpolicy *key_allocsp(const struct secpolicyindex *, u_int, 51struct secpolicy *key_allocsp(const struct secpolicyindex *, u_int,

cvs diff -r1.13 -r1.14 src/sys/netipsec/keydb.h (expand / switch to unified diff)

--- src/sys/netipsec/keydb.h 2013/06/04 22:47:37 1.13
+++ src/sys/netipsec/keydb.h 2015/03/30 03:51:50 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: keydb.h,v 1.13 2013/06/04 22:47:37 christos Exp $ */ 1/* $NetBSD: keydb.h,v 1.14 2015/03/30 03:51:50 ozaki-r Exp $ */
2/* $FreeBSD: src/sys/netipsec/keydb.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ 2/* $FreeBSD: src/sys/netipsec/keydb.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
3/* $KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $ */ 3/* $KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $ */
4 4
5/* 5/*
6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -26,28 +26,26 @@ @@ -26,28 +26,26 @@
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE. 31 * SUCH DAMAGE.
32 */ 32 */
33 33
34#ifndef _NETIPSEC_KEYDB_H_ 34#ifndef _NETIPSEC_KEYDB_H_
35#define _NETIPSEC_KEYDB_H_ 35#define _NETIPSEC_KEYDB_H_
36 36
37#ifdef _KERNEL 37#ifdef _KERNEL
38 38
39#include "opt_ipsec.h" 
40 
41#include <netipsec/key_var.h> 39#include <netipsec/key_var.h>
42#include <net/route.h> 40#include <net/route.h>
43#include <netinet/in.h> 41#include <netinet/in.h>
44 42
45#ifndef _SOCKADDR_UNION_DEFINED 43#ifndef _SOCKADDR_UNION_DEFINED
46#define _SOCKADDR_UNION_DEFINED 44#define _SOCKADDR_UNION_DEFINED
47/* 45/*
48 * The union of all possible address formats we handle. 46 * The union of all possible address formats we handle.
49 */ 47 */
50union sockaddr_union { 48union sockaddr_union {
51 struct sockaddr sa; 49 struct sockaddr sa;
52 struct sockaddr_in sin; 50 struct sockaddr_in sin;
53 struct sockaddr_in6 sin6; 51 struct sockaddr_in6 sin6;

cvs diff -r1.11 -r1.12 src/sys/netipsec/key_debug.c (expand / switch to unified diff)

--- src/sys/netipsec/key_debug.c 2011/05/23 15:17:25 1.11
+++ src/sys/netipsec/key_debug.c 2015/03/30 03:51:50 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: key_debug.c,v 1.11 2011/05/23 15:17:25 drochner Exp $ */ 1/* $NetBSD: key_debug.c,v 1.12 2015/03/30 03:51:50 ozaki-r Exp $ */
2/* $FreeBSD: src/sys/netipsec/key_debug.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ 2/* $FreeBSD: src/sys/netipsec/key_debug.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
3/* $KAME: key_debug.c,v 1.26 2001/06/27 10:46:50 sakane Exp $ */ 3/* $KAME: key_debug.c,v 1.26 2001/06/27 10:46:50 sakane Exp $ */
4 4
5/* 5/*
6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -23,34 +23,33 @@ @@ -23,34 +23,33 @@
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE. 31 * SUCH DAMAGE.
32 */ 32 */
33 33
34#ifdef _KERNEL 34#ifdef _KERNEL
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: key_debug.c,v 1.11 2011/05/23 15:17:25 drochner Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: key_debug.c,v 1.12 2015/03/30 03:51:50 ozaki-r Exp $");
37#endif 37#endif
38 38
39#include "opt_inet.h" 39#include "opt_inet.h"
40#ifdef __FreeBSD__ 40#ifdef __FreeBSD__
41#include "opt_inet6.h" 41#include "opt_inet6.h"
42#endif 42#endif
43#include "opt_ipsec.h" 
44 43
45#include <sys/types.h> 44#include <sys/types.h>
46#include <sys/param.h> 45#include <sys/param.h>
47#ifdef _KERNEL 46#ifdef _KERNEL
48#include <sys/systm.h> 47#include <sys/systm.h>
49#include <sys/mbuf.h> 48#include <sys/mbuf.h>
50#include <sys/queue.h> 49#include <sys/queue.h>
51#endif 50#endif
52#include <sys/socket.h> 51#include <sys/socket.h>
53 52
54#include <net/route.h> 53#include <net/route.h>
55 54
56#include <netipsec/key_var.h> 55#include <netipsec/key_var.h>

cvs diff -r1.43 -r1.44 src/sys/netipsec/keysock.c (expand / switch to unified diff)

--- src/sys/netipsec/keysock.c 2014/08/09 05:33:01 1.43
+++ src/sys/netipsec/keysock.c 2015/03/30 03:51:50 1.44
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: keysock.c,v 1.43 2014/08/09 05:33:01 rtr Exp $ */ 1/* $NetBSD: keysock.c,v 1.44 2015/03/30 03:51:50 ozaki-r Exp $ */
2/* $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ 2/* $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */
3/* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ 3/* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */
4 4
5/* 5/*
6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -22,29 +22,27 @@ @@ -22,29 +22,27 @@
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE. 31 * SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.43 2014/08/09 05:33:01 rtr Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.44 2015/03/30 03:51:50 ozaki-r Exp $");
36 
37#include "opt_ipsec.h" 
38 36
39/* This code has derived from sys/net/rtsock.c on FreeBSD2.2.5 */ 37/* This code has derived from sys/net/rtsock.c on FreeBSD2.2.5 */
40 38
41#include <sys/types.h> 39#include <sys/types.h>
42#include <sys/param.h> 40#include <sys/param.h>
43#include <sys/domain.h> 41#include <sys/domain.h>
44#include <sys/errno.h> 42#include <sys/errno.h>
45#include <sys/kernel.h> 43#include <sys/kernel.h>
46#include <sys/kmem.h> 44#include <sys/kmem.h>
47#include <sys/mbuf.h> 45#include <sys/mbuf.h>
48#include <sys/protosw.h> 46#include <sys/protosw.h>
49#include <sys/signalvar.h> 47#include <sys/signalvar.h>
50#include <sys/socket.h> 48#include <sys/socket.h>

cvs diff -r1.43 -r1.44 src/sys/netipsec/xform_ah.c (expand / switch to unified diff)

--- src/sys/netipsec/xform_ah.c 2015/03/27 05:47:37 1.43
+++ src/sys/netipsec/xform_ah.c 2015/03/30 03:51:50 1.44
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: xform_ah.c,v 1.43 2015/03/27 05:47:37 ozaki-r Exp $ */ 1/* $NetBSD: xform_ah.c,v 1.44 2015/03/30 03:51:50 ozaki-r Exp $ */
2/* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ 2/* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
3/* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ 3/* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */
4/* 4/*
5 * The authors of this code are John Ioannidis (ji@tla.org), 5 * The authors of this code are John Ioannidis (ji@tla.org),
6 * Angelos D. Keromytis (kermit@csd.uch.gr) and 6 * Angelos D. Keromytis (kermit@csd.uch.gr) and
7 * Niels Provos (provos@physnet.uni-hamburg.de). 7 * Niels Provos (provos@physnet.uni-hamburg.de).
8 * 8 *
9 * The original version of this code was written by John Ioannidis 9 * The original version of this code was written by John Ioannidis
10 * for BSD/OS in Athens, Greece, in November 1995. 10 * for BSD/OS in Athens, Greece, in November 1995.
11 * 11 *
12 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996, 12 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
13 * by Angelos D. Keromytis. 13 * by Angelos D. Keromytis.
14 * 14 *
@@ -29,32 +29,33 @@ @@ -29,32 +29,33 @@
29 * You may use this code under the GNU public license if you so wish. Please 29 * You may use this code under the GNU public license if you so wish. Please
30 * contribute changes back to the authors under this freer than GPL license 30 * contribute changes back to the authors under this freer than GPL license
31 * so that we may further the use of strong encryption without limitations to 31 * so that we may further the use of strong encryption without limitations to
32 * all. 32 * all.
33 * 33 *
34 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 34 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
35 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 35 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
36 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 36 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
37 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 37 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
38 * PURPOSE. 38 * PURPOSE.
39 */ 39 */
40 40
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.43 2015/03/27 05:47:37 ozaki-r Exp $"); 42__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.44 2015/03/30 03:51:50 ozaki-r Exp $");
43 43
44#include "opt_inet.h" 44#include "opt_inet.h"
45#ifdef __FreeBSD__ 45#ifdef __FreeBSD__
46#include "opt_inet6.h" 46#include "opt_inet6.h"
47#endif 47#endif
 48#include "opt_ipsec.h"
48 49
49#include <sys/param.h> 50#include <sys/param.h>
50#include <sys/systm.h> 51#include <sys/systm.h>
51#include <sys/mbuf.h> 52#include <sys/mbuf.h>
52#include <sys/socket.h> 53#include <sys/socket.h>
53#include <sys/syslog.h> 54#include <sys/syslog.h>
54#include <sys/kernel.h> 55#include <sys/kernel.h>
55#include <sys/sysctl.h> 56#include <sys/sysctl.h>
56#include <sys/socketvar.h> /* for softnet_lock */ 57#include <sys/socketvar.h> /* for softnet_lock */
57 58
58#include <net/if.h> 59#include <net/if.h>
59 60
60#include <netinet/in.h> 61#include <netinet/in.h>

cvs diff -r1.45 -r1.46 src/sys/netipsec/xform_esp.c (expand / switch to unified diff)

--- src/sys/netipsec/xform_esp.c 2013/11/03 18:37:10 1.45
+++ src/sys/netipsec/xform_esp.c 2015/03/30 03:51:50 1.46
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: xform_esp.c,v 1.45 2013/11/03 18:37:10 mrg Exp $ */ 1/* $NetBSD: xform_esp.c,v 1.46 2015/03/30 03:51:50 ozaki-r Exp $ */
2/* $FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $ */ 2/* $FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $ */
3/* $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */ 3/* $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
4 4
5/* 5/*
6 * The authors of this code are John Ioannidis (ji@tla.org), 6 * The authors of this code are John Ioannidis (ji@tla.org),
7 * Angelos D. Keromytis (kermit@csd.uch.gr) and 7 * Angelos D. Keromytis (kermit@csd.uch.gr) and
8 * Niels Provos (provos@physnet.uni-hamburg.de). 8 * Niels Provos (provos@physnet.uni-hamburg.de).
9 * 9 *
10 * The original version of this code was written by John Ioannidis 10 * The original version of this code was written by John Ioannidis
11 * for BSD/OS in Athens, Greece, in November 1995. 11 * for BSD/OS in Athens, Greece, in November 1995.
12 * 12 *
13 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996, 13 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
14 * by Angelos D. Keromytis. 14 * by Angelos D. Keromytis.
@@ -29,32 +29,33 @@ @@ -29,32 +29,33 @@
29 * You may use this code under the GNU public license if you so wish. Please 29 * You may use this code under the GNU public license if you so wish. Please
30 * contribute changes back to the authors under this freer than GPL license 30 * contribute changes back to the authors under this freer than GPL license
31 * so that we may further the use of strong encryption without limitations to 31 * so that we may further the use of strong encryption without limitations to
32 * all. 32 * all.
33 * 33 *
34 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 34 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
35 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 35 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
36 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 36 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
37 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 37 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
38 * PURPOSE. 38 * PURPOSE.
39 */ 39 */
40 40
41#include <sys/cdefs.h> 41#include <sys/cdefs.h>
42__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.45 2013/11/03 18:37:10 mrg Exp $"); 42__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.46 2015/03/30 03:51:50 ozaki-r Exp $");
43 43
44#include "opt_inet.h" 44#include "opt_inet.h"
45#ifdef __FreeBSD__ 45#ifdef __FreeBSD__
46#include "opt_inet6.h" 46#include "opt_inet6.h"
47#endif 47#endif
 48#include "opt_ipsec.h"
48 49
49#include <sys/param.h> 50#include <sys/param.h>
50#include <sys/systm.h> 51#include <sys/systm.h>
51#include <sys/mbuf.h> 52#include <sys/mbuf.h>
52#include <sys/socket.h> 53#include <sys/socket.h>
53#include <sys/syslog.h> 54#include <sys/syslog.h>
54#include <sys/kernel.h> 55#include <sys/kernel.h>
55/*#include <sys/random.h>*/ 56/*#include <sys/random.h>*/
56#include <sys/sysctl.h> 57#include <sys/sysctl.h>
57#include <sys/socketvar.h> /* for softnet_lock */ 58#include <sys/socketvar.h> /* for softnet_lock */
58 59
59#include <net/if.h> 60#include <net/if.h>
60 61