summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2007-08-28 20:58:08 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2007-08-28 20:58:08 +0000
commit7cb69eebf57a2f0c3f768347a7cfa7c0679ad84b (patch)
treeeb770c0a84ec236760436090e64e7589da339ef7 /net-misc/cisco-vpnclient-3des
parentopengl is always required, USE flag is for opengl vsnc. updated use.local.des... (diff)
downloadhistorical-7cb69eebf57a2f0c3f768347a7cfa7c0679ad84b.tar.gz
historical-7cb69eebf57a2f0c3f768347a7cfa7c0679ad84b.tar.bz2
historical-7cb69eebf57a2f0c3f768347a7cfa7c0679ad84b.zip
Added a 2.6.22 patch from bug #183713 and closing the bug.
Package-Manager: portage-2.1.3.6
Diffstat (limited to 'net-misc/cisco-vpnclient-3des')
-rw-r--r--net-misc/cisco-vpnclient-3des/ChangeLog6
-rw-r--r--net-misc/cisco-vpnclient-3des/Manifest30
-rw-r--r--net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490.ebuild6
-rw-r--r--net-misc/cisco-vpnclient-3des/files/2.6.22.patch383
4 files changed, 413 insertions, 12 deletions
diff --git a/net-misc/cisco-vpnclient-3des/ChangeLog b/net-misc/cisco-vpnclient-3des/ChangeLog
index 72441cbbffe7..282e7dfda2fe 100644
--- a/net-misc/cisco-vpnclient-3des/ChangeLog
+++ b/net-misc/cisco-vpnclient-3des/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/cisco-vpnclient-3des
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/ChangeLog,v 1.51 2007/05/14 19:45:45 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/ChangeLog,v 1.52 2007/08/28 20:58:08 wolf31o2 Exp $
+
+ 28 Aug 2007; Chris Gianelloni <wolf31o2@gentoo.org> +files/2.6.22.patch,
+ cisco-vpnclient-3des-4.8.00.0490.ebuild:
+ Added a 2.6.22 patch from bug #183713 and closing the bug.
14 May 2007; Thilo Bangert <bangert@gentoo.org> metadata.xml:
add <herd>no-herd</herd>
diff --git a/net-misc/cisco-vpnclient-3des/Manifest b/net-misc/cisco-vpnclient-3des/Manifest
index 8b8f741239e0..d2df5ef07ef6 100644
--- a/net-misc/cisco-vpnclient-3des/Manifest
+++ b/net-misc/cisco-vpnclient-3des/Manifest
@@ -1,7 +1,14 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX 2.6.19.patch 3247 RMD160 c3b6dac23c6e297f4a4468a653407b769fb72742 SHA1 bb7d3efa9cfaa1aaf0dcf9811202d651b8aeabd0 SHA256 e6b221751bc87d914b55912304ba0a72536ebc6bd0e3476024b4eb554391e5e5
MD5 3f4623681d5bcd124174906e9f3a6372 files/2.6.19.patch 3247
RMD160 c3b6dac23c6e297f4a4468a653407b769fb72742 files/2.6.19.patch 3247
SHA256 e6b221751bc87d914b55912304ba0a72536ebc6bd0e3476024b4eb554391e5e5 files/2.6.19.patch 3247
+AUX 2.6.22.patch 12897 RMD160 ccb8a185ee36fd6423d58251ae472e711f91143c SHA1 04f6d02906c1fae852ecf5fb4c333bfdd1366349 SHA256 ce86c1391ade1118c84331224974278356663dda4612a443f067fc6b1bcc5633
+MD5 416d9b33716c2b22bbf499d9f5b5b179 files/2.6.22.patch 12897
+RMD160 ccb8a185ee36fd6423d58251ae472e711f91143c files/2.6.22.patch 12897
+SHA256 ce86c1391ade1118c84331224974278356663dda4612a443f067fc6b1bcc5633 files/2.6.22.patch 12897
AUX 4.6.02.0030-2.6.14.patch 1122 RMD160 e6c7860c552548574987932029d0b8df1f4dd09b SHA1 04039e0f6715ab443805074c864c4120e76ca51b SHA256 5067e4f32875972b1b633cb15d9a635c3edcc3ea8f26b58e10b8e57b84803ec4
MD5 393a6d85fef03bd017fad57cc9917e55 files/4.6.02.0030-2.6.14.patch 1122
RMD160 e6c7860c552548574987932029d0b8df1f4dd09b files/4.6.02.0030-2.6.14.patch 1122
@@ -42,14 +49,14 @@ EBUILD cisco-vpnclient-3des-4.7.00.0640.ebuild 2273 RMD160 90af189a1bf8effd88cfa
MD5 292faba9762582d4a1d3bf280e29e305 cisco-vpnclient-3des-4.7.00.0640.ebuild 2273
RMD160 90af189a1bf8effd88cfaf6d3e07dc764ed1da13 cisco-vpnclient-3des-4.7.00.0640.ebuild 2273
SHA256 1992d39efc92aa2df5e465ea1093ec62f5e9e9f43bee2bcb1d2d3060e56a7317 cisco-vpnclient-3des-4.7.00.0640.ebuild 2273
-EBUILD cisco-vpnclient-3des-4.8.00.0490.ebuild 2133 RMD160 640aba924c05634342e1c74a351431a3eebc464d SHA1 f9b85edeeaeb1737c5dcfa0fb9b0bf61386935d2 SHA256 4f39d8e0f66d7b815215859e1a298dfa834418d6038046059bbaeeb94f7213e3
-MD5 e17095a19b033c8f80ebec1749c55a9c cisco-vpnclient-3des-4.8.00.0490.ebuild 2133
-RMD160 640aba924c05634342e1c74a351431a3eebc464d cisco-vpnclient-3des-4.8.00.0490.ebuild 2133
-SHA256 4f39d8e0f66d7b815215859e1a298dfa834418d6038046059bbaeeb94f7213e3 cisco-vpnclient-3des-4.8.00.0490.ebuild 2133
-MISC ChangeLog 13863 RMD160 1787e10aedb24b242b286e892f03ceee41260110 SHA1 7a406b3ebab74ef918312abec8568431ae372f71 SHA256 ee212e7b785790ab24820a7a87af00979869c3643926c75ddad7fdf01f4b32da
-MD5 57aafa0ea0537cb00f42dad871253378 ChangeLog 13863
-RMD160 1787e10aedb24b242b286e892f03ceee41260110 ChangeLog 13863
-SHA256 ee212e7b785790ab24820a7a87af00979869c3643926c75ddad7fdf01f4b32da ChangeLog 13863
+EBUILD cisco-vpnclient-3des-4.8.00.0490.ebuild 2131 RMD160 a4783083c30beaee1fb2df27abb01040b730a0f2 SHA1 e838f1025bdef27df1bd359f194896d9e63e5741 SHA256 e35aa6c68ec416cfaf0b4b7a2bac9227c17e078bb90e4285f7d7c19805c99148
+MD5 0182db4b4a73ffe282d8dd5fd8d60d83 cisco-vpnclient-3des-4.8.00.0490.ebuild 2131
+RMD160 a4783083c30beaee1fb2df27abb01040b730a0f2 cisco-vpnclient-3des-4.8.00.0490.ebuild 2131
+SHA256 e35aa6c68ec416cfaf0b4b7a2bac9227c17e078bb90e4285f7d7c19805c99148 cisco-vpnclient-3des-4.8.00.0490.ebuild 2131
+MISC ChangeLog 14044 RMD160 a121f8f68f1ab2ef65794cb8c7922e5707263ad0 SHA1 bb076fa74dce50017b5b14b2e057fd992351e75e SHA256 1572cb7ab8950e60046abb57458a68d753d5ffd1365962daf12219db12663aee
+MD5 b017c41890bbf1f84331e5cb4aebe647 ChangeLog 14044
+RMD160 a121f8f68f1ab2ef65794cb8c7922e5707263ad0 ChangeLog 14044
+SHA256 1572cb7ab8950e60046abb57458a68d753d5ffd1365962daf12219db12663aee ChangeLog 14044
MISC metadata.xml 757 RMD160 60c81426ce38824eb2302520f55c204e6d35c4fe SHA1 170b258b21c5260d39f9b24151a85895c4557763 SHA256 51156c87787b5b5c034cf46843c2d09e15c6c889699ec6df47bf4760d116e01a
MD5 d73f09763957ef63c1fd72fbce7f5163 metadata.xml 757
RMD160 60c81426ce38824eb2302520f55c204e6d35c4fe metadata.xml 757
@@ -66,3 +73,10 @@ SHA256 78891ba993a718f038207ce06529af8536291d4afb889fbbc196ebd6a6f0b182 files/di
MD5 b629ca886d55951825a39b009bb4f624 files/digest-cisco-vpnclient-3des-4.8.00.0490 316
RMD160 ebed3d7aa111ac70849fab7c39e108bf98cf062e files/digest-cisco-vpnclient-3des-4.8.00.0490 316
SHA256 a3e015b55bb71f18f8fef4a6e76b9086a3e6f86aec3bab193884d1e8bbf015a4 files/digest-cisco-vpnclient-3des-4.8.00.0490 316
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.5 (GNU/Linux)
+
+iD8DBQFG1IxjkT4lNIS36YERApEKAKCWt77ZanzW2ae1LnL1FxoGuDDcVgCfUSW8
+7waYTnin1D3bTxH4xCELm9Y=
+=J334
+-----END PGP SIGNATURE-----
diff --git a/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490.ebuild b/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490.ebuild
index 3fb4c472d6f8..b193d71d62d6 100644
--- a/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490.ebuild
+++ b/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490.ebuild,v 1.8 2007/04/28 16:51:49 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.8.00.0490.ebuild,v 1.9 2007/08/28 20:58:08 wolf31o2 Exp $
inherit eutils linux-mod
@@ -11,7 +11,7 @@ SRC_URI="vpnclient-linux-x86_64-${MY_PV}.tar.gz"
LICENSE="cisco-vpn-client"
SLOT="0"
-KEYWORDS="-* ~amd64 ~x86"
+KEYWORDS="-* amd64 x86"
IUSE=""
RESTRICT="fetch strip" # stricter"
@@ -36,7 +36,7 @@ src_unpack () {
unpack ${A}
cd "${S}"
- epatch ${FILESDIR}/2.6.19.patch
+ epatch ${FILESDIR}/2.6.22.patch
}
src_compile () {
diff --git a/net-misc/cisco-vpnclient-3des/files/2.6.22.patch b/net-misc/cisco-vpnclient-3des/files/2.6.22.patch
new file mode 100644
index 000000000000..a94cdbbcec31
--- /dev/null
+++ b/net-misc/cisco-vpnclient-3des/files/2.6.22.patch
@@ -0,0 +1,383 @@
+diff -Nur vpnclient.orig/frag.c vpnclient/frag.c
+--- vpnclient.orig/frag.c 2005-11-22 10:52:00.000000000 +0100
++++ vpnclient/frag.c 2007-05-29 16:03:42.000000000 +0200
+@@ -1,4 +1,18 @@
+-#include <linux/config.h>
++/**************************************************************************
++ * Copyright (c) 2001, Cisco Systems, All Rights Reserved
++ ***************************************************************************
++ *
++ * File: frag.c
++ * Date: 22/03/01
++ *
++ * Updated to work with Linux kernels >=2.6.19 (including 2.6.22) by
++ * Alexander Griesser 29/05/07 <cisco@tuxx-home.at>
++ *
++ ***************************************************************************
++ * This module does some really cool stuff only Cisco knows about
++ ***************************************************************************/
++
++#include <linux/autoconf.h>
+ #include <linux/version.h>
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
+@@ -37,9 +51,10 @@
+ int ret=FALSE;
+ struct frag_queue_entry *cur=NULL,*n=NULL,*prev=NULL;
+
+- id = ntohs(skb->nh.iph->id);
++ id = ntohs(CISCOVPN_SKB_NH_ID(skb));
++
+ /* look for an entry with the same id as this packet*/
+- if (frag_queue_head && id != ntohs(frag_queue_head->skb->nh.iph->id))
++ if (frag_queue_head && id != ntohs(CISCOVPN_SKB_NH_ID(frag_queue_head->skb)))
+ {
+ printk(KERN_INFO "%s: incomplete fragment set destroyed",__FUNCTION__);
+ cleanup_frag_queue();
+@@ -57,10 +72,13 @@
+ cur = frag_queue_head;
+
+ prev = NULL;
+- skb_offset = ntohs(skb->nh.iph->frag_off) & IP_OFFSET;
++
++ skb_offset = ntohs(CISCOVPN_SKB_NH_FRAGOFF(skb)) & IP_OFFSET;
++
+ while (cur)
+ {
+- cur_offset = ntohs(cur->skb->nh.iph->frag_off) & IP_OFFSET;
++ cur_offset = ntohs(CISCOVPN_SKB_NH_FRAGOFF(cur->skb)) & IP_OFFSET;
++
+ /*sanity check*/
+ if (cur_offset < prev_offset)
+ {
+@@ -112,8 +130,9 @@
+ goto done_with_tests;
+ }
+ cur = frag_queue_head;
++
+ /*first in queue must be first frag.*/
+- if ((ntohs(cur->skb->nh.iph->frag_off) & IP_OFFSET) != 0)
++ if ((ntohs(CISCOVPN_SKB_NH_FRAGOFF(cur->skb)) & IP_OFFSET) != 0)
+ {
+ goto done_with_tests;
+ }
+@@ -121,19 +140,22 @@
+ by comparing adjacent offset values and packet lengths*/
+ while (cur)
+ {
+- cur_offset = (ntohs(cur->skb->nh.iph->frag_off) & IP_OFFSET)*8;
+- if (cur_offset != prev_end_offset)
++ cur_offset = (ntohs(CISCOVPN_SKB_NH_FRAGOFF(cur->skb)) & IP_OFFSET)*8;
++
++ if (cur_offset != prev_end_offset)
+ {
+ goto done_with_tests;
+ }
+ prev = cur;
+ prev_offset = cur_offset;
+- prev_end_offset = prev_offset + ntohs(prev->skb->nh.iph->tot_len)
+- - (prev->skb->nh.iph->ihl*4);
++
++ prev_end_offset = prev_offset + ntohs(CISCOVPN_SKB_NH_TOTLEN(prev->skb))
++ - (CISCOVPN_SKB_NH_IHL(prev->skb)*4);
+ cur = cur->next;
+ }
+ /*last in queue must not have more frags set*/
+- if (ntohs(prev->skb->nh.iph->frag_off) & IP_MF)
++
++ if (ntohs(CISCOVPN_SKB_NH_FRAGOFF(prev->skb)) & IP_MF)
+ {
+ goto done_with_tests;
+ }
+@@ -185,10 +207,12 @@
+ /*not an IP packet*/
+ goto done_with_tests;
+ }
+- iph = skb->nh.iph;
++
++ iph = CISCOVPN_SKB_IPHEADER(skb);
++
+ if (!iph)
+ {
+- printk(KERN_DEBUG "%s: skb->nh is NULL.", __FUNCTION__);
++ printk(KERN_DEBUG "%s: iph (IP Header) is NULL.", __FUNCTION__);
+ goto done_with_tests;
+ }
+ offset = ntohs(iph->frag_off);
+diff -Nur vpnclient.orig/interceptor.c vpnclient/interceptor.c
+--- vpnclient.orig/interceptor.c 2005-11-22 10:52:00.000000000 +0100
++++ vpnclient/interceptor.c 2007-05-29 16:08:57.000000000 +0200
+@@ -5,10 +5,13 @@
+ * File: interceptor.c
+ * Date: 04/10/2001
+ *
++* Updated to work with Linux kernels >=2.6.19 (including 2.6.22) by
++* Alexander Griesser 29/05/07 <cisco@tuxx-home.at>
++*
+ ***************************************************************************
+ * This module implements the linux driver.
+ ***************************************************************************/
+-#include <linux/config.h>
++#include <linux/autoconf.h>
+ #include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
+@@ -339,13 +342,18 @@
+
+ dp = NULL;
+ num_target_devices = 0;
+- for (dp = dev_base; dp != NULL; dp = dp->next)
+- {
++
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ for_each_netdev(dp)
++ #else
++ for (dp = dev_base; dp != NULL; dp = dp->next)
++ #endif
++ {
+ if (add_netdev(dp) == 0)
+ {
+ num_target_devices++;
+ }
+- }
++ }
+
+ if (num_target_devices == 0)
+ {
+@@ -550,13 +558,13 @@
+ goto exit_gracefully;
+ }
+
+- if (skb->ip_summed == CHECKSUM_HW)
++ if (CHECK_IP_SUMMED(skb->ip_summed))
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+- if (skb_checksum_help(skb,1))
++ if (SKB_CHECKSUM_HELP(skb,1))
+ #else
+- if (skb_checksum_help(&skb,1))
++ if (SKB_CHECKSUM_HELP(&skb,1))
+ #endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+ {
+ dev_kfree_skb(skb);
+@@ -569,9 +577,10 @@
+ }
+
+ reset_inject_status(&pBinding->recv_stat);
+- if (skb->mac.raw)
++
++ if (CISCOVPN_SKB_MACHEADER(skb))
+ {
+- hard_header_len = skb->data - skb->mac.raw;
++ hard_header_len = skb->data - CISCOVPN_SKB_MACHEADER(skb);
+ if ((hard_header_len < 0) || (hard_header_len > skb_headroom(skb)))
+ {
+ printk(KERN_DEBUG "bad hh len %d\n", hard_header_len);
+@@ -588,7 +597,7 @@
+ switch (hard_header_len)
+ {
+ case ETH_HLEN:
+- CniNewFragment(ETH_HLEN, skb->mac.raw, &MacHdr, CNI_USE_BUFFER);
++ CniNewFragment(ETH_HLEN, CISCOVPN_SKB_MACHEADER(skb), &MacHdr, CNI_USE_BUFFER);
+ break;
+ case IPPP_MAX_HEADER:
+ case 0:
+@@ -677,14 +686,14 @@
+ tmp_InjectSend = NULL;
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+- if (skb->ip_summed == CHECKSUM_HW)
++ if (CHECK_IP_SUMMED(skb->ip_summed))
+ {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
+- if (skb_checksum_help(skb,0))
++ if (SKB_CHECKSUM_HELP(skb,0))
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+- if (skb_checksum_help(&skb,0))
++ if (SKB_CHECKSUM_HELP(&skb,0))
+ #else
+- if ((skb = skb_checksum_help(skb)) == NULL)
++ if ((skb = SKB_CHECKSUM_HELP(skb)) == NULL)
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+ {
+ goto exit_gracefully;
+@@ -692,7 +701,8 @@
+ }
+ #endif //LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
+ reset_inject_status(&pBinding->send_stat);
+- hard_header_len = skb->nh.raw - skb->data;
++
++ hard_header_len = CISCOVPN_SKB_NETWORKHEADER(skb) - skb->data;
+ pBinding->send_real_hh_len = hard_header_len;
+ switch (hard_header_len)
+ {
+diff -Nur vpnclient.orig/IPSecDrvOS_linux.c vpnclient/IPSecDrvOS_linux.c
+--- vpnclient.orig/IPSecDrvOS_linux.c 2005-11-22 10:52:00.000000000 +0100
++++ vpnclient/IPSecDrvOS_linux.c 2007-05-29 13:42:39.000000000 +0200
+@@ -11,7 +11,7 @@
+ *
+ *
+ ***************************************************************************/
+-#include <linux/config.h>
++#include <linux/autoconf.h>
+ #include <linux/version.h>
+ #include <linux/vmalloc.h>
+ #include <linux/sched.h>
+diff -Nur vpnclient.orig/linuxcniapi.c vpnclient/linuxcniapi.c
+--- vpnclient.orig/linuxcniapi.c 2005-11-22 10:52:00.000000000 +0100
++++ vpnclient/linuxcniapi.c 2007-05-29 13:56:57.000000000 +0200
+@@ -5,11 +5,14 @@
+ * File: linuxcniapi.c
+ * Date: 22/03/01
+ *
++ * Updated to work with Linux kernels >=2.6.19 (including 2.6.22) by
++ * Alexander Griesser 29/05/07 <cisco@tuxx-home.at>
++ *
+ ***************************************************************************
+ * This module implements a translation layer between the CNI API and the
+ * Linux Interceptor driver.
+ ***************************************************************************/
+-#include <linux/config.h>
++#include <linux/autoconf.h>
+ #include <linux/version.h>
+ #include <linux/netdevice.h>
+ #include <linux/if.h>
+@@ -292,9 +295,19 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+ {
+ struct timeval timestamp;
+-
+ do_gettimeofday(&timestamp);
+- skb_set_timestamp(skb,&timestamp);
++ /* With Linux 2.6.22 skb_set_timestamp has been dropped.
++ * Additionally, the attribute tstamp now is in ktime_t
++ * where it prior to 2.6.22 was in skb_timeval.
++ *
++ * As a proprietary module, we may not use ktime_get_real,
++ * so we need to do it this way
++ */
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb->tstamp = timeval_to_ktime(timestamp);
++ #else
++ skb_set_timestamp(skb,&timestamp);
++ #endif
+ }
+ #else
+ do_gettimeofday(&skb->stamp);
+@@ -328,8 +341,13 @@
+
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
+
+- skb->nh.iph = (struct iphdr *) skb->data;
+- skb->mac.raw = pMac;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb_reset_network_header(skb);
++ skb_reset_mac_header(skb);
++ #else
++ skb->nh.iph = (struct iphdr *) skb->data;
++ skb->mac.raw = pMac;
++ #endif
+
+ pBinding->recv_stat.called = TRUE;
+
+@@ -441,9 +459,19 @@
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+ {
+ struct timeval timestamp;
+-
+ do_gettimeofday(&timestamp);
+- skb_set_timestamp(skb,&timestamp);
++ /* With Linux 2.6.22 skb_set_timestamp has been dropped.
++ * Additionally, the attribute tstamp now is in ktime_t
++ * where it prior to 2.6.22 was in skb_timeval.
++ *
++ * As a proprietary module, we may not use ktime_get_real,
++ * so we need to do it this way
++ */
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb->tstamp = timeval_to_ktime(timestamp);
++ #else
++ skb_set_timestamp(skb,&timestamp);
++ #endif
+ }
+ #else
+ do_gettimeofday(&skb->stamp);
+@@ -451,11 +479,21 @@
+
+ skb->dev = pBinding->pDevice;
+
+- skb->mac.raw = pMac;
+- skb->nh.raw = pIP;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb_reset_mac_header(skb);
++ skb_reset_network_header(skb);
++ #else
++ skb->mac.raw = pMac;
++ skb->nh.raw = pIP;
++ #endif
+
+ /*ip header length is in 32bit words */
+- skb->h.raw = pIP + (skb->nh.iph->ihl * 4);
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb->transport_header = skb->network_header + (ip_hdr(skb)->ihl * 4);
++ #else
++ skb->h.raw = pIP + (skb->nh.iph->ihl * 4);
++ #endif
++
+ skb->protocol = htons(ETH_P_IP);
+
+ /* send this packet up the NIC driver */
+diff -Nur vpnclient.orig/linux_os.h vpnclient/linux_os.h
+--- vpnclient.orig/linux_os.h 2005-11-22 10:52:00.000000000 +0100
++++ vpnclient/linux_os.h 2007-05-29 16:05:44.000000000 +0200
+@@ -5,6 +5,9 @@
+ * File: linux_os.h
+ * Date: 04/25/2001
+ *
++* Updated to work with Linux kernels >=2.6.19 (including 2.6.22) by
++* Alexander Griesser 29/05/07 <cisco@tuxx-home.at>
++*
+ ***************************************************************************
+ *
+ * Macros for handling differences in the linux kernel api.
+@@ -30,6 +33,39 @@
+ #define PACKET_TYPE_NEXT(pt) ((pt)->next)
+ #endif
+
++/* With linux 2.6.19, CHECKSUM_HW was split into CHECKSUM_COMPLETE
++ * and CHECKSUM_PARTIAL
++ */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++ #define CHECK_IP_SUMMED(n) \
++ (((n) == CHECKSUM_COMPLETE) || ((n) == CHECKSUM_PARTIAL))
++ #define SKB_CHECKSUM_HELP(a,b) skb_checksum_help((a))
++#else
++ #define CHECK_IP_SUMMED(n) ((n) == CHECKSUM_HW)
++ #define SKB_CHECKSUM_HELP(a,b) skb_checksum_help((a),(b))
++#endif
++
++
++/* With linux 2.6.22, the sk_buff struct has changed
++ */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ #define CISCOVPN_SKB_NH_ID(a) (ip_hdr(a)->id)
++ #define CISCOVPN_SKB_NH_FRAGOFF(a) (ip_hdr(a)->frag_off)
++ #define CISCOVPN_SKB_NH_TOTLEN(a) (ip_hdr(a)->tot_len)
++ #define CISCOVPN_SKB_NH_IHL(a) (ip_hdr(a)->ihl)
++ #define CISCOVPN_SKB_IPHEADER(a) (ip_hdr(a))
++ #define CISCOVPN_SKB_MACHEADER(a) (skb_mac_header(a))
++ #define CISCOVPN_SKB_NETWORKHEADER(a) (skb_network_header(a))
++#else
++ #define CISCOVPN_SKB_NH_ID(a) (a->nh.iph->id)
++ #define CISCOVPN_SKB_NH_FRAGOFF(a) (a->nh.iph->frag_off)
++ #define CISCOVPN_SKB_NH_TOTLEN(a) (a->nh.iph->tot_len)
++ #define CISCOVPN_SKB_NH_IHL(a) (a->nh.iph->ihl)
++ #define CISCOVPN_SKB_IPHEADER(a) (a->nh.iph)
++ #define CISCOVPN_SKB_MACHEADER(a) (a->mac.raw)
++ #define CISCOVPN_SKB_NETWORKHEADER(a) (a->nh.raw)
++#endif
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,5)
+ #include <asm/uaccess.h>
+ #else