use a single PATH_IPSEC_H to fix some path_to_ipsec.h issues

This commit is contained in:
vanhu 2007-07-18 12:07:49 +00:00
parent 0ca21723a0
commit c3bc7fe364
31 changed files with 110 additions and 178 deletions

View File

@ -1,3 +1,37 @@
2007-07-18 Yvan Vanhullebus <vanhu@netasq.com>
* configure.ac
src/libipsec/ipsec_dump_policy.c
src/libipsec/ipsec_get_policylen.c
src/libipsec/ipsec_strerror.c
src/libipsec/key_debug.c
src/libipsec/libpfkey.h
src/libipsec/pfkey.c
src/libipsec/pfkey_dump.c
src/libipsec/policy_parse.y
src/libipsec/policy_token.l
src/libipsec/test-policy-priority.c
src/racoon/admin.c
src/racoon/backupsa.c
src/racoon/cfparse.y
src/racoon/cftoken.l
src/racoon/ipsec_doi.c
src/racoon/isakmp.c
src/racoon/isakmp_inf.c
src/racoon/isakmp_quick.c
src/racoon/pfkey.c
src/racoon/policy.c
src/racoon/proposal.c
src/racoon/remoteconf.c
src/racoon/sainfo.c
src/racoon/session.c
src/racoon/sockmisc.c
src/racoon/strnames.c
src/setkey/parse.y
src/setkey/setkey.c
src/setkey/token.l:
use a single PATH_IPSEC_H to fix some path_to_ipsec.h issues.
2007-07-16 Yvan Vanhullebus <vanhu@netasq.com>
* src/racoon/proposal.c: indentation
* src/racoon/grabmyaddr.c: fixed a socket leak.

View File

@ -43,11 +43,25 @@ esac
AC_CHECK_HEADER(net/pfkeyv2.h, [have_net_pfkey=yes], [have_net_pfkey=no])
AC_CHECK_HEADER(netinet/ipsec.h, [have_netinet_ipsec=yes], [have_netinet_ipsec=no])
AC_CHECK_HEADER(netinet6/ipsec.h, [have_netinet6_ipsec=yes], [have_netinet6_ipsec=no])
AC_CHECK_HEADER(netipsec/ipsec.h, [have_netipsec_ipsec=yes], [have_netipsec_ipsec=no])
# FreeBSD >=7 has only <netipsec/ipsec.h>
# NetBSD has <netinet6/ipsec.h> but not <netinet/ipsec.h>
if test "$have_netinet_ipsec$have_netinet6_ipsec" = noyes; then
# XXX some *BSD still have both <netinet6/ipsec.h> and <netipsec/ipsec.h>,
# we can't decide which one to use (actually <netinet6/ipsec.h>)
if test "$have_netinet_ipsec$have_netinet6_ipsec$have_netipsec_ipsec" = nonoyes; then
have_netinet_ipsec=yes
AC_DEFINE(HAVE_NETINET6_IPSEC, [], [Use <netinet6/ipsec.h>])
AC_DEFINE(PATH_IPSEC_H, [<netipsec/ipsec.h>], [Path to ipsec.h])
else
if test "$have_netinet_ipsec$have_netinet6_ipsec" = noyes; then
have_netinet_ipsec=yes
AC_DEFINE(PATH_IPSEC_H, [<netinet6/ipsec.h>], [Path to ipsec.h])
else
# have_netinet_ipsec will be checked a few lines below
AC_DEFINE(PATH_IPSEC_H, [<netinet/ipsec.h>], [Path to ipsec.h])
fi
fi
case "$host_os" in

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec_dump_policy.c,v 1.7 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: ipsec_dump_policy.c,v 1.8 2007/07/18 12:07:50 vanhu Exp $ */
/* Id: ipsec_dump_policy.c,v 1.10 2005/06/29 09:12:37 manubsd Exp */
@ -40,11 +40,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <arpa/inet.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec_get_policylen.c,v 1.6 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: ipsec_get_policylen.c,v 1.7 2007/07/18 12:07:50 vanhu Exp $ */
/* $KAME: ipsec_get_policylen.c,v 1.5 2000/05/07 05:25:03 itojun Exp $ */
@ -39,11 +39,7 @@
#include <sys/param.h>
#include <sys/socket.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <net/pfkeyv2.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec_strerror.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: ipsec_strerror.c,v 1.5 2007/07/18 12:07:50 vanhu Exp $ */
/* $KAME: ipsec_strerror.c,v 1.7 2000/07/30 00:45:12 itojun Exp $ */
@ -39,11 +39,7 @@
#include <sys/param.h>
#include <string.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include "ipsec_strerror.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: key_debug.c,v 1.7 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: key_debug.c,v 1.8 2007/07/18 12:07:50 vanhu Exp $ */
/* $KAME: key_debug.c,v 1.29 2001/08/16 14:25:41 itojun Exp $ */
@ -60,11 +60,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#ifndef _KERNEL
#include <ctype.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: libpfkey.h,v 1.12 2006/12/10 18:46:39 manu Exp $ */
/* $NetBSD: libpfkey.h,v 1.13 2007/07/18 12:07:50 vanhu Exp $ */
/* Id: libpfkey.h,v 1.13 2005/12/04 20:26:43 manubsd Exp */
@ -55,11 +55,7 @@ struct sadb_alg;
/* Accomodate different prototypes in <netinet6/ipsec.h> */
#include <sys/types.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#ifndef HAVE_IPSEC_POLICY_T
typedef caddr_t ipsec_policy_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pfkey.c,v 1.13 2006/12/10 18:46:39 manu Exp $ */
/* $NetBSD: pfkey.c,v 1.14 2007/07/18 12:07:50 vanhu Exp $ */
/* $KAME: pfkey.c,v 1.47 2003/10/02 19:52:12 itojun Exp $ */
@ -40,11 +40,7 @@
#include <sys/socket.h>
#include <net/pfkeyv2.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <unistd.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: pfkey_dump.c,v 1.15 2006/10/06 12:02:27 manu Exp $ */
/* $NetBSD: pfkey_dump.c,v 1.16 2007/07/18 12:07:50 vanhu Exp $ */
/* $KAME: pfkey_dump.c,v 1.45 2003/09/08 10:14:56 itojun Exp $ */
@ -38,11 +38,7 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <net/pfkeyv2.h>
#include <netinet/in.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: policy_parse.y,v 1.9 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: policy_parse.y,v 1.10 2007/07/18 12:07:50 vanhu Exp $ */
/* $KAME: policy_parse.y,v 1.21 2003/12/12 08:01:26 itojun Exp $ */
@ -72,11 +72,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: policy_token.l,v 1.6 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: policy_token.l,v 1.7 2007/07/18 12:07:50 vanhu Exp $ */
/* Id: policy_token.l,v 1.12 2005/05/05 12:32:18 manubsd Exp */
@ -41,11 +41,7 @@
#include <sys/socket.h>
#include <net/pfkeyv2.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <limits.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: test-policy-priority.c,v 1.3 2006/09/09 16:22:09 manu Exp $ */
/* $NetBSD: test-policy-priority.c,v 1.4 2007/07/18 12:07:51 vanhu Exp $ */
/* $KAME: test-policy.c,v 1.16 2003/08/26 03:24:08 itojun Exp $ */
@ -41,11 +41,7 @@
#include <netinet/in.h>
#include <net/pfkeyv2.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: admin.c,v 1.17 2006/10/03 20:43:10 manu Exp $ */
/* $NetBSD: admin.c,v 1.18 2007/07/18 12:07:51 vanhu Exp $ */
/* Id: admin.c,v 1.25 2006/04/06 14:31:04 manubsd Exp */
@ -43,11 +43,7 @@
#include <net/pfkeyv2.h>
#include <netinet/in.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: backupsa.c,v 1.8 2006/12/10 18:46:39 manu Exp $ */
/* $NetBSD: backupsa.c,v 1.9 2007/07/18 12:07:51 vanhu Exp $ */
/* $KAME: backupsa.c,v 1.16 2001/12/31 20:13:40 thorpej Exp $ */
@ -43,11 +43,7 @@
#include <ctype.h>
#include <netinet/in.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#if TIME_WITH_SYS_TIME
# include <sys/time.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: cfparse.y,v 1.22 2007/05/16 21:00:40 christos Exp $ */
/* $NetBSD: cfparse.y,v 1.23 2007/07/18 12:07:51 vanhu Exp $ */
/* Id: cfparse.y,v 1.66 2006/08/22 18:17:17 manubsd Exp */
@ -40,11 +40,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#ifdef ENABLE_HYBRID
#include <arpa/inet.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: cftoken.l,v 1.11 2006/12/09 05:52:57 manu Exp $ */
/* $NetBSD: cftoken.l,v 1.12 2007/07/18 12:07:51 vanhu Exp $ */
/* Id: cftoken.l,v 1.53 2006/08/22 18:17:17 manubsd Exp */
@ -39,11 +39,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec_doi.c,v 1.30 2007/04/04 13:09:36 vanhu Exp $ */
/* $NetBSD: ipsec_doi.c,v 1.31 2007/07/18 12:07:51 vanhu Exp $ */
/* Id: ipsec_doi.c,v 1.55 2006/08/17 09:20:41 vanhu Exp */
@ -39,11 +39,7 @@
#include <netinet/in.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: isakmp.c,v 1.26 2007/05/04 09:09:47 vanhu Exp $ */
/* $NetBSD: isakmp.c,v 1.27 2007/07/18 12:07:51 vanhu Exp $ */
/* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */
@ -41,11 +41,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: isakmp_inf.c,v 1.21 2007/05/04 09:09:35 vanhu Exp $ */
/* $NetBSD: isakmp_inf.c,v 1.22 2007/07/18 12:07:51 vanhu Exp $ */
/* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */
@ -40,11 +40,7 @@
#include <net/pfkeyv2.h>
#include <netinet/in.h>
#include <sys/queue.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: isakmp_quick.c,v 1.11 2006/12/09 05:52:57 manu Exp $ */
/* $NetBSD: isakmp_quick.c,v 1.12 2007/07/18 12:07:51 vanhu Exp $ */
/* Id: isakmp_quick.c,v 1.29 2006/08/22 18:17:17 manubsd Exp */
@ -57,11 +57,7 @@
#include <resolv.h>
#endif
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include "var.h"
#include "vmbuf.h"

View File

@ -1,6 +1,6 @@
/* $NetBSD: pfkey.c,v 1.21 2007/05/04 09:09:26 vanhu Exp $ */
/* $NetBSD: pfkey.c,v 1.22 2007/07/18 12:07:52 vanhu Exp $ */
/* $Id: pfkey.c,v 1.21 2007/05/04 09:09:26 vanhu Exp $ */
/* $Id: pfkey.c,v 1.22 2007/07/18 12:07:52 vanhu Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -65,11 +65,7 @@
#include <net/pfkeyv2.h>
#include <netinet/in.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <fcntl.h>
#include "libpfkey.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: policy.c,v 1.6 2006/12/09 05:52:57 manu Exp $ */
/* $NetBSD: policy.c,v 1.7 2007/07/18 12:07:52 vanhu Exp $ */
/* $KAME: policy.c,v 1.46 2001/11/16 04:08:10 sakane Exp $ */
@ -39,11 +39,7 @@
#include <sys/queue.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,6 +1,6 @@
/* $NetBSD: proposal.c,v 1.14 2007/07/16 15:03:13 vanhu Exp $ */
/* $NetBSD: proposal.c,v 1.15 2007/07/18 12:07:52 vanhu Exp $ */
/* $Id: proposal.c,v 1.14 2007/07/16 15:03:13 vanhu Exp $ */
/* $Id: proposal.c,v 1.15 2007/07/18 12:07:52 vanhu Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -39,11 +39,7 @@
#include <sys/queue.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: remoteconf.c,v 1.9 2006/12/09 05:52:57 manu Exp $ */
/* $NetBSD: remoteconf.c,v 1.10 2007/07/18 12:07:52 vanhu Exp $ */
/* Id: remoteconf.c,v 1.38 2006/05/06 15:52:44 manubsd Exp */
@ -42,11 +42,7 @@
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sainfo.c,v 1.7 2006/11/16 00:30:55 mgrooms Exp $ */
/* $NetBSD: sainfo.c,v 1.8 2007/07/18 12:07:52 vanhu Exp $ */
/* $KAME: sainfo.c,v 1.16 2003/06/27 07:32:39 sakane Exp $ */
@ -40,11 +40,7 @@
#include <netinet/in.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: session.c,v 1.8 2007/06/06 09:47:29 vanhu Exp $ */
/* $NetBSD: session.c,v 1.9 2007/07/18 12:07:52 vanhu Exp $ */
/* $KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $ */
@ -47,11 +47,7 @@
# define WIFEXITED(s) (((s) & 255) == 0)
#endif
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sockmisc.c,v 1.8 2006/10/31 00:17:21 cbiere Exp $ */
/* $NetBSD: sockmisc.c,v 1.9 2007/07/18 12:07:52 vanhu Exp $ */
/* Id: sockmisc.c,v 1.24 2006/05/07 21:32:59 manubsd Exp */
@ -39,11 +39,7 @@
#include <sys/uio.h>
#include <netinet/in.h>
#ifndef HAVE_NETINET6_IPSEC
#include <netinet/ipsec.h>
#else
#include <netinet6/ipsec.h>
#endif
#include PATH_IPSEC_H
#if defined(INET6) && !defined(INET6_ADVAPI) && \
defined(IP_RECVDSTADDR) && !defined(IPV6_RECVDSTADDR)

View File

@ -1,4 +1,4 @@
/* $NetBSD: strnames.c,v 1.7 2006/10/06 12:02:27 manu Exp $ */
/* $NetBSD: strnames.c,v 1.8 2007/07/18 12:07:52 vanhu Exp $ */
/* $KAME: strnames.c,v 1.25 2003/11/13 10:53:26 itojun Exp $ */
@ -38,11 +38,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <netinet/in.h>
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: parse.y,v 1.9 2006/09/09 16:22:37 manu Exp $ */
/* $NetBSD: parse.y,v 1.10 2007/07/18 12:07:52 vanhu Exp $ */
/* $KAME: parse.y,v 1.81 2003/07/01 04:01:48 itojun Exp $ */
@ -42,11 +42,7 @@
#include <netinet/in.h>
#include <net/pfkeyv2.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <arpa/inet.h>
#include <string.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: setkey.c,v 1.11 2006/09/09 16:22:37 manu Exp $ */
/* $NetBSD: setkey.c,v 1.12 2007/07/18 12:07:52 vanhu Exp $ */
/* $KAME: setkey.c,v 1.36 2003/09/24 23:52:51 itojun Exp $ */
@ -44,11 +44,7 @@
#include <err.h>
#include <netinet/in.h>
#include <net/pfkeyv2.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: token.l,v 1.11 2006/10/06 12:02:27 manu Exp $ */
/* $NetBSD: token.l,v 1.12 2007/07/18 12:07:53 vanhu Exp $ */
/* $KAME: token.l,v 1.44 2003/10/21 07:20:58 itojun Exp $ */
@ -42,11 +42,7 @@
#include <sys/socket.h>
#include <net/pfkeyv2.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET6_IPSEC
# include <netinet6/ipsec.h>
#else
# include <netinet/ipsec.h>
#endif
#include PATH_IPSEC_H
#include <stdlib.h>
#include <limits.h>