ipsec-tools: fix compilation against Linux 3.7, refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/packages@35312 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f86e014492
commit
73bb02239f
@ -19,6 +19,8 @@ PKG_MD5SUM:=b79aae3055a51f8de5c0f1b8ca6cf619
|
|||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/ipsec-tools
|
define Package/ipsec-tools
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
diff -brau ipsec-tools-0.7.3.o/src/racoon/oakley.c ipsec-tools-0.7.3/src/racoon/oakley.c
|
--- a/src/racoon/oakley.c
|
||||||
--- a/src/racoon/oakley.c 2009-08-13 11:18:45.000000000 +0200
|
+++ b/src/racoon/oakley.c
|
||||||
+++ b/src/racoon/oakley.c 2011-06-06 09:36:11.000000000 +0200
|
@@ -2419,8 +2419,21 @@ oakley_skeyid(iph1)
|
||||||
@@ -2498,8 +2498,21 @@
|
|
||||||
plog(LLV_ERROR, LOCATION, iph1->remote,
|
plog(LLV_ERROR, LOCATION, iph1->remote,
|
||||||
"couldn't find the pskey for %s.\n",
|
"couldn't find the pskey for %s.\n",
|
||||||
saddrwop2str(iph1->remote));
|
saddrwop2str(iph1->remote));
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
diff -urN build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0/src/racoon/isakmp_cfg.c build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0a/src/racoon/isakmp_cfg.c
|
--- a/src/racoon/isakmp_cfg.c
|
||||||
--- a/src/racoon/isakmp_cfg.c 2010-09-21 16:14:17.000000000 +0300
|
+++ b/src/racoon/isakmp_cfg.c
|
||||||
+++ b/src/racoon/isakmp_cfg.c 2011-07-13 11:52:16.000000000 +0300
|
|
||||||
@@ -38,7 +38,7 @@
|
@@ -38,7 +38,7 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
@ -10,7 +9,7 @@ diff -urN build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0/src/racoon/isakmp_cfg
|
|||||||
#if defined(__APPLE__) && defined(__MACH__)
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -1661,7 +1661,8 @@
|
@@ -1661,7 +1661,8 @@ isakmp_cfg_accounting_system(port, raddr
|
||||||
int inout;
|
int inout;
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
@ -20,7 +19,7 @@ diff -urN build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0/src/racoon/isakmp_cfg
|
|||||||
char addr[NI_MAXHOST];
|
char addr[NI_MAXHOST];
|
||||||
|
|
||||||
if (usr == NULL || usr[0]=='\0') {
|
if (usr == NULL || usr[0]=='\0') {
|
||||||
@@ -1670,34 +1671,37 @@
|
@@ -1670,34 +1671,37 @@ isakmp_cfg_accounting_system(port, raddr
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
diff -urN build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0/src/racoon/ipsec_doi.c build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0a/src/racoon/ipsec_doi.c
|
--- a/src/racoon/ipsec_doi.c
|
||||||
--- a/src/racoon/ipsec_doi.c 2010-12-14 19:57:31.000000000 +0200
|
+++ b/src/racoon/ipsec_doi.c
|
||||||
+++ b/src/racoon/ipsec_doi.c 2011-07-13 12:07:44.000000000 +0300
|
@@ -3582,8 +3582,8 @@ ipsecdoi_checkid1(iph1)
|
||||||
@@ -3582,8 +3582,8 @@
|
|
||||||
iph1->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_PSKEY) {
|
iph1->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_PSKEY) {
|
||||||
if (id_b->type != IPSECDOI_ID_IPV4_ADDR
|
if (id_b->type != IPSECDOI_ID_IPV4_ADDR
|
||||||
&& id_b->type != IPSECDOI_ID_IPV6_ADDR) {
|
&& id_b->type != IPSECDOI_ID_IPV6_ADDR) {
|
||||||
|
50
net/ipsec-tools/patches/006-linux-3.7-compat.patch
Normal file
50
net/ipsec-tools/patches/006-linux-3.7-compat.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -75,9 +75,10 @@ case "$host_os" in
|
||||||
|
[ KERNEL_INCLUDE="/lib/modules/`uname -r`/build/include" ])
|
||||||
|
|
||||||
|
AC_CHECK_HEADER($KERNEL_INCLUDE/linux/pfkeyv2.h, ,
|
||||||
|
- [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h,
|
||||||
|
- KERNEL_INCLUDE=/usr/src/linux/include ,
|
||||||
|
- [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] )
|
||||||
|
+ [ AC_CHECK_HEADER($KERNEL_INCLUDE/uapi/linux/pfkeyv2.h, ,
|
||||||
|
+ [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h,
|
||||||
|
+ KERNEL_INCLUDE=/usr/src/linux/include ,
|
||||||
|
+ [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] ) ] )
|
||||||
|
AC_SUBST(KERNEL_INCLUDE)
|
||||||
|
# We need the configure script to run with correct kernel headers.
|
||||||
|
# However we don't want to point to kernel source tree in compile time,
|
||||||
|
@@ -644,7 +645,14 @@ AC_EGREP_CPP(yes,
|
||||||
|
#ifdef SADB_X_EXT_NAT_T_TYPE
|
||||||
|
yes
|
||||||
|
#endif
|
||||||
|
-], [kernel_natt="yes"])
|
||||||
|
+], [kernel_natt="yes"], [
|
||||||
|
+ AC_EGREP_CPP(yes,
|
||||||
|
+ [#include <uapi/linux/pfkeyv2.h>
|
||||||
|
+ #ifdef SADB_X_EXT_NAT_T_TYPE
|
||||||
|
+ yes
|
||||||
|
+ #endif
|
||||||
|
+ ], [kernel_natt="yes"])
|
||||||
|
+])
|
||||||
|
;;
|
||||||
|
freebsd*|netbsd*)
|
||||||
|
# NetBSD case
|
||||||
|
--- a/src/include-glibc/Makefile.am
|
||||||
|
+++ b/src/include-glibc/Makefile.am
|
||||||
|
@@ -1,14 +1,7 @@
|
||||||
|
-
|
||||||
|
-.includes: ${top_builddir}/config.status
|
||||||
|
- ln -sf $(KERNEL_INCLUDE)/linux
|
||||||
|
- touch .includes
|
||||||
|
-
|
||||||
|
-all: .includes
|
||||||
|
-
|
||||||
|
EXTRA_DIST = \
|
||||||
|
glibc-bugs.h \
|
||||||
|
net/pfkeyv2.h \
|
||||||
|
netinet/ipsec.h \
|
||||||
|
sys/queue.h
|
||||||
|
|
||||||
|
-DISTCLEANFILES = .includes linux
|
||||||
|
+DISTCLEANFILES = linux
|
Loading…
x
Reference in New Issue
Block a user