From f2e625a3cd5f62d25f1c09a786665c50455a2dc1 Mon Sep 17 00:00:00 2001 From: jow Date: Sat, 2 Oct 2010 16:53:46 +0000 Subject: [PATCH] [packages] openswan: add missing parts of #7725 git-svn-id: svn://svn.openwrt.org/openwrt/packages@23180 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/openswan/patches/110-scripts.patch | 11 +++++ net/openswan/patches/131-klips_2_6_35.patch | 46 +++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 net/openswan/patches/131-klips_2_6_35.patch diff --git a/net/openswan/patches/110-scripts.patch b/net/openswan/patches/110-scripts.patch index 8af8a998f..d23ca12c5 100644 --- a/net/openswan/patches/110-scripts.patch +++ b/net/openswan/patches/110-scripts.patch @@ -17,3 +17,14 @@ then echo Cannot write to directory to create \"$stderrlog\". exit 1 +--- a/programs/_realsetup/_realsetup.in ++++ b/programs/_realsetup/_realsetup.in +@@ -283,7 +283,7 @@ case "$1" in + + # misc pre-Pluto setup + +- perform test -d $subsysdir "&&" touch $subsyslock ++ rm test -d `echo $subsyslock | sed -r 's/(^.*\/)(.*$)/\1/'` "&&" touch $subsyslock "&&" rm -f $subsyslock + + manualconns + diff --git a/net/openswan/patches/131-klips_2_6_35.patch b/net/openswan/patches/131-klips_2_6_35.patch new file mode 100644 index 000000000..9dc00e4f7 --- /dev/null +++ b/net/openswan/patches/131-klips_2_6_35.patch @@ -0,0 +1,46 @@ +--- a/linux/net/ipsec/pfkey_v2.c ++++ b/linux/net/ipsec/pfkey_v2.c +@@ -720,11 +720,20 @@ pfkey_create(struct socket *sock, int pr + /* sk->num = protocol; */ + sk->sk_protocol = protocol; + key_pid(sk) = current_uid(); ++ ++#ifdef HAVE_SOCKET_WQ ++ KLIPS_PRINT(debug_pfkey, ++ "klips_debug:pfkey_create: " ++ "sock->wq->fasync_list=0p%p sk_sleep(sk)=0p%p.\n", ++ sock->wq->fasync_list, ++ sk_sleep(sk)); ++#else + KLIPS_PRINT(debug_pfkey, + "klips_debug:pfkey_create: " + "sock->fasync_list=0p%p sk->sleep=0p%p.\n", + sock->fasync_list, + sk->sk_sleep); ++#endif + + pfkey_insert_socket(sk); + pfkey_list_insert_socket(sock, &pfkey_open_sockets); +@@ -1157,7 +1166,9 @@ pfkey_get_info(char *buffer, char **star + sk, + key_pid(sk), + sock_flag(sk, SOCK_DEAD), ++#ifndef HAVE_SOCKET_WQ + sk->sk_sleep, ++#endif + sk->sk_socket, + sk->sk_err, + sk->sk_reuse, +--- a/linux/include/openswan/ipsec_kversion.h ++++ b/linux/include/openswan/ipsec_kversion.h +@@ -506,6 +506,10 @@ + #define CTL_NAME(n) .ctl_name = n, + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35) ++#define HAVE_SOCKET_WQ ++#endif ++ + #if __KERNEL__ + # if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,0) + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)