diff options
Diffstat (limited to 'net-misc/cisco-vpnclient-3des/files')
-rw-r--r-- | net-misc/cisco-vpnclient-3des/files/4.8.01.0640-2.6.24.patch | 241 | ||||
-rw-r--r-- | net-misc/cisco-vpnclient-3des/files/4.8.01.0640-amd64.patch | 116 |
2 files changed, 0 insertions, 357 deletions
diff --git a/net-misc/cisco-vpnclient-3des/files/4.8.01.0640-2.6.24.patch b/net-misc/cisco-vpnclient-3des/files/4.8.01.0640-2.6.24.patch deleted file mode 100644 index 1540288..0000000 --- a/net-misc/cisco-vpnclient-3des/files/4.8.01.0640-2.6.24.patch +++ /dev/null @@ -1,241 +0,0 @@ -diff -r 469eaa76099e GenDefs.h ---- a/GenDefs.h Mon Apr 28 10:40:53 2008 +0200 -+++ b/GenDefs.h Mon Apr 28 10:47:51 2008 +0200 -@@ -105,6 +105,12 @@ typedef int32 intptr_t; - #define _INTPTR_T_DEFINED - #endif - -+/* uintptr_t has been defined in include/linux/types.h in 2.6.24. -+ * No need to define it here again (will only lead to compile errors) -+ * -+ * by Alexander Griesser <work@tuxx-home.at>, 2008-01-11 -+ */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) - #ifndef _UINTPTR_T_DEFINED - #if defined(_LP64) - #warning 64 bit -@@ -113,6 +119,7 @@ typedef uint32 uintptr_t; - typedef uint32 uintptr_t; - #endif - #define _UINTPTR_T_DEFINED -+#endif - #endif - - -diff -r 469eaa76099e Makefile ---- a/Makefile Mon Apr 28 10:40:53 2008 +0200 -+++ b/Makefile Mon Apr 28 10:47:51 2008 +0200 -@@ -12,7 +12,7 @@ SOURCE_OBJS := linuxcniapi.o frag.o IPSe - SOURCE_OBJS := linuxcniapi.o frag.o IPSecDrvOS_linux.o interceptor.o linuxkernelapi.o - - ifeq ($(SUBARCH),x86_64) --CFLAGS += -mcmodel=kernel -mno-red-zone -+EXTRA_CFLAGS += -mcmodel=kernel -mno-red-zone - NO_SOURCE_OBJS := libdriver64.so - else - NO_SOURCE_OBJS := libdriver.so -diff -r 469eaa76099e interceptor.c ---- a/interceptor.c Mon Apr 28 10:40:53 2008 +0200 -+++ b/interceptor.c Mon Apr 28 10:47:51 2008 +0200 -@@ -28,6 +28,10 @@ - #include <linux/udp.h> - #include <net/protocol.h> - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+#include <net/net_namespace.h> -+#endif -+ - #include "linux_os.h" - - #include "vpn_ioctl_linux.h" -@@ -39,7 +43,7 @@ - - static uint8_t interceptor_eth_addr[] = { 0x00, 0x0b, 0xfc, 0xf8, 0x01, 0x8f }; - --// packet statistics -+// packet statistics - static unsigned long tx_packets; - static unsigned long tx_dropped; - static unsigned long tx_bytes; -@@ -48,7 +52,13 @@ unsigned long rx_bytes; - unsigned long rx_bytes; - - /*methods of the cipsec network device*/ --static int interceptor_init(struct net_device *); -+static -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+void -+#else -+int -+#endif -+interceptor_init(struct net_device *); - static struct net_device_stats *interceptor_stats(struct net_device *dev); - static int interceptor_ioctl(struct net_device *dev, struct ifreq *ifr, - int cmd); -@@ -82,12 +92,12 @@ struct packet_type_funcs - { - struct packet_type *pt; - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) -- int (*orig_handler_func) (struct sk_buff *, -+ int (*orig_handler_func) (struct sk_buff *, - struct net_device *, - struct packet_type *, - struct net_device *); - #else -- int (*orig_handler_func) (struct sk_buff *, -+ int (*orig_handler_func) (struct sk_buff *, - struct net_device *, - struct packet_type *); - #endif -@@ -107,16 +117,30 @@ static char interceptor_name[] = LINUX_V - - BINDING Bindings[MAX_INTERFACES]; - -+/* 2.6.24 handles net_devices a little bit different -+ * -+ * by Alexander Griesser <work@tuxx-home.at>, 2008-01-11 -+ */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+static struct net_device* interceptor_dev; -+#else - static struct net_device interceptor_dev = { - .name = interceptor_name, - .init = interceptor_init - }; -+#endif -+ - static struct notifier_block interceptor_notifier = { - .notifier_call = handle_netdev_event, - }; - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) --static int -+static -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+void -+#else -+int -+#endif - #else - static int __init - #endif -@@ -133,8 +157,9 @@ interceptor_init(struct net_device *dev) - dev->flags |= IFF_NOARP; - dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST); - kernel_memset(dev->broadcast, 0xFF, ETH_ALEN); -- -- return 0; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) -+ return 0; -+#endif - } - - static struct net_device_stats * -@@ -270,7 +295,7 @@ add_netdev(struct net_device *dev) - Bindings[i].InjectReceive = original_ip_handler.orig_handler_func; - Bindings[i].pPT = original_ip_handler.pt; - -- rc = 0; -+ rc = 0; - - exit_gracefully: - return rc; -@@ -284,7 +309,7 @@ remove_netdev(struct net_device *dev) - b = getbindingbydev(dev); - - if (b) -- { -+ { - rc = 0; - dev->hard_start_xmit = b->InjectSend; - kernel_memset(b, 0, sizeof(BINDING)); -@@ -326,7 +351,7 @@ handle_vpnup(void) - } - /* find the handler for inbound IP packets by adding a dummy handler - * for that packet type into the kernel. Because the packet handlers -- * are stored in a hash table, we'll be able to pull the original -+ * are stored in a hash table, we'll be able to pull the original - * ip packet handler out of the list that dummy_pt was inserted into.*/ - kernel_memset(&dummy_pt, 0, sizeof(dummy_pt)); - dummy_pt.type = htons(ETH_P_IP); -@@ -363,7 +388,11 @@ handle_vpnup(void) - dp = NULL; - num_target_devices = 0; - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -- for_each_netdev(dp) -+ for_each_netdev( -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+ &init_net, -+#endif -+ dp) - #else - for (dp = dev_base; dp != NULL; dp = dp->next) - #endif -@@ -494,7 +523,7 @@ getbindingbydev(struct net_device *dev) - getbindingbydev(struct net_device *dev) - { - int i; -- -+ - for (i=0; i <= MAX_INTERFACES; i++) - { - BINDING *b = &Bindings[i]; -@@ -522,13 +551,13 @@ build_ppp_fake_mac_frag(struct ethhdr *d - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) - static int - recv_ip_packet_handler(struct sk_buff *skb, -- struct net_device *dev, -+ struct net_device *dev, - struct packet_type *type, - struct net_device *orig_dev) - #else - static int - recv_ip_packet_handler(struct sk_buff *skb, -- struct net_device *dev, -+ struct net_device *dev, - struct packet_type *type) - #endif - { -@@ -932,15 +961,29 @@ interceptor_mod_init(void) - - rc = CniPluginLoad(&pcDeviceName, &PCNICallbackTable); - -+/* 2.6.24 needs to allocate each netdevice before registering it, otherwise -+ * the kernel BUG()s. -+ * -+ * by Alexander Griesser <work@tuxx-home.at>, 2008-01-11 -+ */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+ if(! (interceptor_dev = alloc_netdev(sizeof(struct net_device), interceptor_name, interceptor_init))) -+ return 0; -+#endif -+ - if (CNI_IS_SUCCESS(rc)) - { - - CNICallbackTable = *PCNICallbackTable; - CniPluginDeviceCreated(); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+ if ((status = register_netdev(interceptor_dev)) != 0) -+#else - if ((status = register_netdev(&interceptor_dev)) != 0) -+#endif - { - printk(KERN_INFO "%s: error %d registering device \"%s\".\n", -- LINUX_VPN_IFNAME, status, interceptor_dev.name); -+ LINUX_VPN_IFNAME, status, interceptor_name); - CniPluginUnload(); - - } -@@ -960,7 +1003,11 @@ interceptor_mod_cleanup(void) - cleanup_frag_queue(); - CniPluginUnload(); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) -+ unregister_netdev(interceptor_dev); -+#else - unregister_netdev(&interceptor_dev); -+#endif - unregister_netdevice_notifier(&interceptor_notifier); - - return; diff --git a/net-misc/cisco-vpnclient-3des/files/4.8.01.0640-amd64.patch b/net-misc/cisco-vpnclient-3des/files/4.8.01.0640-amd64.patch deleted file mode 100644 index 015dc7b..0000000 --- a/net-misc/cisco-vpnclient-3des/files/4.8.01.0640-amd64.patch +++ /dev/null @@ -1,116 +0,0 @@ -diff -u -x '*.ko*' -x '*.o*' vpnclient/frag.c vpnclient_modified/frag.c ---- vpnclient/frag.c 2007-08-22 15:30:31.000000000 -0400 -+++ vpnclient_modified/frag.c 2008-01-11 01:41:19.000000000 -0500 -@@ -22,7 +22,11 @@ - #include "frag.h" - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -+#ifdef NET_SKBUFF_DATA_USES_OFFSET -+#define SKB_IPHDR(skb) ((struct iphdr*)(skb->head + skb->network_header)) -+#else - #define SKB_IPHDR(skb) ((struct iphdr*)skb->network_header) -+#endif - #else - #define SKB_IPHDR(skb) skb->nh.iph - #endif -diff -u -x '*.ko*' -x '*.o*' vpnclient/interceptor.c vpnclient_modified/interceptor.c ---- vpnclient/interceptor.c 2007-08-22 15:30:31.000000000 -0400 -+++ vpnclient_modified/interceptor.c 2008-01-11 02:04:01.000000000 -0500 -@@ -636,7 +636,11 @@ - #endif - { - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -+ #ifdef NET_SKBUFF_DATA_USES_OFFSET -+ hard_header_len = skb->data - (skb->head + skb->mac_header); -+ #else - hard_header_len = skb->data - skb->mac_header; -+ #endif - #else - hard_header_len = skb->data - skb->mac.raw; - #endif -@@ -657,7 +661,11 @@ - { - case ETH_HLEN: - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -+ #ifdef NET_SKBUFF_DATA_USES_OFFSET -+ CniNewFragment(ETH_HLEN, skb->head + skb->mac_header, &MacHdr, CNI_USE_BUFFER); -+ #else - CniNewFragment(ETH_HLEN, skb->mac_header, &MacHdr, CNI_USE_BUFFER); -+ #endif - #else - CniNewFragment(ETH_HLEN, skb->mac.raw, &MacHdr, CNI_USE_BUFFER); - #endif -@@ -667,7 +675,7 @@ - MacHdr = build_ppp_fake_mac_frag(&ppp_dummy_buf); - break; - default: -- printk(KERN_DEBUG "unknown mac header length (%d)\n", hard_header_len); -+ printk(KERN_DEBUG "unknown mac header length (%d) CniNewFragment\n", hard_header_len); - dev_kfree_skb(skb); - skb = NULL; - goto exit_gracefully; -@@ -775,7 +783,12 @@ - #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) - reset_inject_status(&pBinding->send_stat); - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -- hard_header_len = skb->network_header - skb->data; -+ #ifdef NET_SKBUFF_DATA_USES_OFFSET -+ hard_header_len = -+ (skb->head + skb->network_header) - skb->data; -+ #else -+ hard_header_len = skb->network_header - skb->data; -+ #endif - #else - hard_header_len = skb->nh.raw - skb->data; - #endif -diff -u -x '*.ko*' -x '*.o*' vpnclient/linuxcniapi.c vpnclient_modified/linuxcniapi.c ---- vpnclient/linuxcniapi.c 2007-08-22 15:30:31.000000000 -0400 -+++ vpnclient_modified/linuxcniapi.c 2008-01-11 01:41:19.000000000 -0500 -@@ -338,8 +338,13 @@ - skb->ip_summed = CHECKSUM_UNNECESSARY; - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -- skb->network_header = (sk_buff_data_t) skb->data; -- skb->mac_header = (sk_buff_data_t)pMac; -+ #ifdef NET_SKBUFF_DATA_USES_OFFSET -+ skb->network_header = (sk_buff_data_t) (skb->data - skb->head); -+ skb->mac_header = (sk_buff_data_t) (pMac - skb->head); -+ #else -+ skb->network_header = (sk_buff_data_t) skb->data; -+ skb->mac_header = (sk_buff_data_t)pMac; -+ #endif - #else - skb->nh.iph = (struct iphdr *) skb->data; - skb->mac.raw = pMac; -@@ -478,8 +483,13 @@ - skb->dev = pBinding->pDevice; - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -- skb->mac_header = (sk_buff_data_t)pMac; -- skb->network_header = (sk_buff_data_t)pIP; -+ #ifdef NET_SKBUFF_DATA_USES_OFFSET -+ skb->mac_header = (sk_buff_data_t)(pMac - skb->head); -+ skb->network_header = (sk_buff_data_t)(pIP - skb->head); -+ #else -+ skb->mac_header = (sk_buff_data_t)pMac; -+ skb->network_header = (sk_buff_data_t)pIP; -+ #endif - #else - skb->mac.raw = pMac; - skb->nh.raw = pIP; -@@ -487,8 +497,13 @@ - - /*ip header length is in 32bit words */ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) -- skb->transport_header = (sk_buff_data_t) -- (pIP + (((struct iphdr*)(skb->network_header))->ihl * 4)); -+ #ifdef NET_SKBUFF_DATA_USES_OFFSET -+ skb->transport_header = (sk_buff_data_t) -+ ((pIP + (((struct iphdr*)(skb->head + skb->network_header))->ihl * 4)) - skb->head); -+ #else -+ skb->transport_header = (sk_buff_data_t) -+ (pIP + (((struct iphdr*)(skb->network_header))->ihl * 4)); -+ #endif - #else - skb->h.raw = pIP + (skb->nh.iph->ihl * 4); - #endif |