[packages] openswan: add missing parts of #7725
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 2 Oct 2010 16:53:46 +0000 (16:53 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 2 Oct 2010 16:53:46 +0000 (16:53 +0000)
SVN-Revision: 23180

net/openswan/patches/110-scripts.patch
net/openswan/patches/131-klips_2_6_35.patch [new file with mode: 0644]

index 8af8a998fad2050fe577866dcd1e26a2590b5d29..d23ca12c534dd8d6986d3ee43ccfb43df72283ef 100644 (file)
                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 (file)
index 0000000..9dc00e4
--- /dev/null
@@ -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)