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)