PKGBUILDs/extra/openswan-klips/openswan-2.4.7-2.6.19.diff
2009-10-09 21:23:22 -05:00

29 lines
1.1 KiB
Diff

diff -urN openswan-2.4.7/linux/include/openswan/ipsec_kversion.h openswan-2.4.7-2.6.19/linux/include/openswan/ipsec_kversion.h
--- openswan-2.4.7/linux/include/openswan/ipsec_kversion.h 2006-07-29 08:00:40.000000000 +0300
+++ openswan-2.4.7-2.6.19/linux/include/openswan/ipsec_kversion.h 2006-12-01 21:15:45.000000000 +0200
@@ -142,6 +142,10 @@
#define HAVE_NEW_SKB_LINEARIZE
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+#define VOID_SOCK_UNREGISTER
+#endif
+
#ifdef NET_21
# include <linux/in6.h>
#else
diff -urN openswan-2.4.7/linux/net/ipsec/pfkey_v2.c openswan-2.4.7-2.6.19/linux/net/ipsec/pfkey_v2.c
--- openswan-2.4.7/linux/net/ipsec/pfkey_v2.c 2006-10-10 23:43:28.000000000 +0300
+++ openswan-2.4.7-2.6.19/linux/net/ipsec/pfkey_v2.c 2006-12-01 21:17:16.000000000 +0200
@@ -1503,7 +1503,11 @@
printk(KERN_INFO "klips_info:pfkey_cleanup: "
"shutting down PF_KEY domain sockets.\n");
+#ifdef VOID_SOCK_UNREGISTER
+ sock_unregister(PF_KEY);
+#else
error |= sock_unregister(PF_KEY);
+#endif
error |= supported_remove_all(SADB_SATYPE_AH);
error |= supported_remove_all(SADB_SATYPE_ESP);