From: jow Date: Thu, 24 Jan 2013 11:35:58 +0000 (+0000) Subject: ipsec-tools: fix compilation against Linux 3.7, refresh patches X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=73bb02239fbfbf2c0a01f9ea6bc705940124ae2e;p=packages.git 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 --- diff --git a/net/ipsec-tools/Makefile b/net/ipsec-tools/Makefile index 50b333206..1dcd9f9a8 100644 --- a/net/ipsec-tools/Makefile +++ b/net/ipsec-tools/Makefile @@ -19,6 +19,8 @@ PKG_MD5SUM:=b79aae3055a51f8de5c0f1b8ca6cf619 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf + include $(INCLUDE_DIR)/package.mk define Package/ipsec-tools diff --git a/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch b/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch index 16f450467..7f46569f2 100644 --- a/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch +++ b/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch @@ -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 2009-08-13 11:18:45.000000000 +0200 -+++ b/src/racoon/oakley.c 2011-06-06 09:36:11.000000000 +0200 -@@ -2498,8 +2498,21 @@ +--- a/src/racoon/oakley.c ++++ b/src/racoon/oakley.c +@@ -2419,8 +2419,21 @@ oakley_skeyid(iph1) plog(LLV_ERROR, LOCATION, iph1->remote, "couldn't find the pskey for %s.\n", saddrwop2str(iph1->remote)); diff --git a/net/ipsec-tools/patches/002-patch8-utmp.patch b/net/ipsec-tools/patches/002-patch8-utmp.patch index 5d36cb87b..16dc9237c 100644 --- a/net/ipsec-tools/patches/002-patch8-utmp.patch +++ b/net/ipsec-tools/patches/002-patch8-utmp.patch @@ -1,16 +1,15 @@ -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 2010-09-21 16:14:17.000000000 +0300 -+++ b/src/racoon/isakmp_cfg.c 2011-07-13 11:52:16.000000000 +0300 +--- a/src/racoon/isakmp_cfg.c ++++ b/src/racoon/isakmp_cfg.c @@ -38,7 +38,7 @@ #include #include - + -#include +#include #if defined(__APPLE__) && defined(__MACH__) #include #endif -@@ -1661,7 +1661,8 @@ +@@ -1661,7 +1661,8 @@ isakmp_cfg_accounting_system(port, raddr int inout; { int error = 0; @@ -20,15 +19,15 @@ diff -urN build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0/src/racoon/isakmp_cfg char addr[NI_MAXHOST]; if (usr == NULL || usr[0]=='\0') { -@@ -1670,34 +1671,37 @@ +@@ -1670,34 +1671,37 @@ isakmp_cfg_accounting_system(port, raddr return -1; } - + - memset(&ut, 0, sizeof ut); - gettimeofday((struct timeval *)&ut.ut_tv, NULL); - snprintf(ut.ut_id, sizeof ut.ut_id, TERMSPEC, port); + sprintf(term, TERMSPEC, port); - + switch (inout) { case ISAKMP_CFG_LOGIN: - ut.ut_type = USER_PROCESS; @@ -38,34 +37,34 @@ diff -urN build_dir/linux-ar71xx_generic/ipsec-tools-0.8.0/src/racoon/isakmp_cfg + + strncpy(ut.ut_line, term, UT_LINESIZE); + ut.ut_line[UT_LINESIZE - 1] = '\0'; - + GETNAMEINFO_NULL(raddr, addr); - strncpy(ut.ut_host, addr, sizeof ut.ut_host); + strncpy(ut.ut_host, addr, UT_HOSTSIZE); + ut.ut_host[UT_HOSTSIZE - 1] = '\0'; + + ut.ut_time = time(NULL); - + plog(LLV_INFO, LOCATION, NULL, "Accounting : '%s' logging on '%s' from %s.\n", - ut.ut_user, ut.ut_id, addr); - - pututxline(&ut); + ut.ut_name, ut.ut_line, ut.ut_host); - + + login(&ut); + break; case ISAKMP_CFG_LOGOUT: - ut.ut_type = DEAD_PROCESS; - + plog(LLV_INFO, LOCATION, NULL, "Accounting : '%s' unlogging from '%s'.\n", - usr, ut.ut_id); - - pututxline(&ut); + usr, term); - + + logout(term); + break; diff --git a/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch b/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch index 900741eaa..443d38d5e 100644 --- a/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch +++ b/net/ipsec-tools/patches/003-microsoft-fqdn-in-main.patch @@ -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 2010-12-14 19:57:31.000000000 +0200 -+++ b/src/racoon/ipsec_doi.c 2011-07-13 12:07:44.000000000 +0300 -@@ -3582,8 +3582,8 @@ +--- a/src/racoon/ipsec_doi.c ++++ b/src/racoon/ipsec_doi.c +@@ -3582,8 +3582,8 @@ ipsecdoi_checkid1(iph1) iph1->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_PSKEY) { if (id_b->type != IPSECDOI_ID_IPV4_ADDR && id_b->type != IPSECDOI_ID_IPV6_ADDR) { diff --git a/net/ipsec-tools/patches/006-linux-3.7-compat.patch b/net/ipsec-tools/patches/006-linux-3.7-compat.patch new file mode 100644 index 000000000..e11a6c736 --- /dev/null +++ b/net/ipsec-tools/patches/006-linux-3.7-compat.patch @@ -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 ++ #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