summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2007-09-07 17:58:45 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2007-09-07 17:58:45 +0000
commit21edbf5307ec06f0325d915ed1ddcb8cd72c4c71 (patch)
tree35b7c046464db7a942db6da02b35bb10847fb8bf /net-misc
parentppc stable, bug #191479 (diff)
downloadhistorical-21edbf5307ec06f0325d915ed1ddcb8cd72c4c71.tar.gz
historical-21edbf5307ec06f0325d915ed1ddcb8cd72c4c71.tar.bz2
historical-21edbf5307ec06f0325d915ed1ddcb8cd72c4c71.zip
Added a patch from Antti Mäkelä <zarhan@cs.tut.fi> for 2.6.22 support. Closing bug #191572.
Package-Manager: portage-2.1.3.7
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/cisco-vpnclient-3des/ChangeLog8
-rw-r--r--net-misc/cisco-vpnclient-3des/Manifest28
-rw-r--r--net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.7.00.0640-r1.ebuild4
-rw-r--r--net-misc/cisco-vpnclient-3des/files/4.7.00.0640-2.6.22.patch356
4 files changed, 381 insertions, 15 deletions
diff --git a/net-misc/cisco-vpnclient-3des/ChangeLog b/net-misc/cisco-vpnclient-3des/ChangeLog
index b86b45b05df0..f672216a5a56 100644
--- a/net-misc/cisco-vpnclient-3des/ChangeLog
+++ b/net-misc/cisco-vpnclient-3des/ChangeLog
@@ -1,6 +1,12 @@
# 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.53 2007/09/04 18:35:13 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/ChangeLog,v 1.54 2007/09/07 17:58:44 wolf31o2 Exp $
+
+ 07 Sep 2007; Chris Gianelloni <wolf31o2@gentoo.org>
+ +files/4.7.00.0640-2.6.22.patch,
+ cisco-vpnclient-3des-4.7.00.0640-r1.ebuild:
+ Added a patch from Antti Mäkelä <zarhan@cs.tut.fi> for 2.6.22 support.
+ Closing bug #191572.
*cisco-vpnclient-3des-4.7.00.0640-r1 (04 Sep 2007)
diff --git a/net-misc/cisco-vpnclient-3des/Manifest b/net-misc/cisco-vpnclient-3des/Manifest
index c39788e72fbb..84b9e1b1b917 100644
--- a/net-misc/cisco-vpnclient-3des/Manifest
+++ b/net-misc/cisco-vpnclient-3des/Manifest
@@ -25,6 +25,10 @@ AUX 4.7.00.0640-2.6.14.patch 1122 RMD160 e6c7860c552548574987932029d0b8df1f4dd09
MD5 393a6d85fef03bd017fad57cc9917e55 files/4.7.00.0640-2.6.14.patch 1122
RMD160 e6c7860c552548574987932029d0b8df1f4dd09b files/4.7.00.0640-2.6.14.patch 1122
SHA256 5067e4f32875972b1b633cb15d9a635c3edcc3ea8f26b58e10b8e57b84803ec4 files/4.7.00.0640-2.6.14.patch 1122
+AUX 4.7.00.0640-2.6.22.patch 11658 RMD160 ee2fefab1a9dd10e62c13afb91b9656a754b4301 SHA1 aafd920f408b188ff0f8b65f362ab28186ba2b46 SHA256 2eec130f3f00d9eae019fd6236d4039a59197ec5626b8ac27f61205d72e11dba
+MD5 ccec3bfd38484b5208be59334cc1b0ef files/4.7.00.0640-2.6.22.patch 11658
+RMD160 ee2fefab1a9dd10e62c13afb91b9656a754b4301 files/4.7.00.0640-2.6.22.patch 11658
+SHA256 2eec130f3f00d9eae019fd6236d4039a59197ec5626b8ac27f61205d72e11dba files/4.7.00.0640-2.6.22.patch 11658
AUX driver_build_CC.patch 547 RMD160 9de233256381d54c6168b0ce1bc5d84fe8048506 SHA1 352f32eac28165efd0de6f0b74694b62910df67f SHA256 4b32234c8a259cac99da8ec0aef0dff673558b1b198688b0fbcd5a712e54bfec
MD5 fffa4fdd9a7bd0eeae2d4832895ce99f files/driver_build_CC.patch 547
RMD160 9de233256381d54c6168b0ce1bc5d84fe8048506 files/driver_build_CC.patch 547
@@ -45,10 +49,10 @@ EBUILD cisco-vpnclient-3des-4.6.03.0190-r1.ebuild 2243 RMD160 dfbadc8be22cab1cba
MD5 edf4292e623ee867817577031bcaf6c0 cisco-vpnclient-3des-4.6.03.0190-r1.ebuild 2243
RMD160 dfbadc8be22cab1cbab08100c7491f3add136138 cisco-vpnclient-3des-4.6.03.0190-r1.ebuild 2243
SHA256 8d6a14215d5a7cc10ccc3ac22cfca55132c98d4fb9f3f1b85a50279811f4b290 cisco-vpnclient-3des-4.6.03.0190-r1.ebuild 2243
-EBUILD cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2277 RMD160 d451d9a5a49a7599664866944833c1aa9a2ae154 SHA1 1f8024a422d9f399261c46e70cc599fd10fe7b83 SHA256 88de9e3eacaa821eb58aaa774e39c2db97c076edfa8eb54f74aefedb6d115c7c
-MD5 4e3a96808ecd628d4e2befa835f092d5 cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2277
-RMD160 d451d9a5a49a7599664866944833c1aa9a2ae154 cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2277
-SHA256 88de9e3eacaa821eb58aaa774e39c2db97c076edfa8eb54f74aefedb6d115c7c cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2277
+EBUILD cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2283 RMD160 7f143807c2381553adf2e4caee52e21944036d17 SHA1 f895b1e7ae8d75abf6d3d2410a7c1660e80ae0ea SHA256 5939f8402b213c175f245b41cf740b81af570e13b9f91697b4613a31548e64ff
+MD5 1f6ff0299246b81378bcc8654eb86d7d cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2283
+RMD160 7f143807c2381553adf2e4caee52e21944036d17 cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2283
+SHA256 5939f8402b213c175f245b41cf740b81af570e13b9f91697b4613a31548e64ff cisco-vpnclient-3des-4.7.00.0640-r1.ebuild 2283
EBUILD cisco-vpnclient-3des-4.7.00.0640.ebuild 2273 RMD160 90af189a1bf8effd88cfaf6d3e07dc764ed1da13 SHA1 7f8d4bf416c37b94af8d98908debbd8c8bbd1f8c SHA256 1992d39efc92aa2df5e465ea1093ec62f5e9e9f43bee2bcb1d2d3060e56a7317
MD5 292faba9762582d4a1d3bf280e29e305 cisco-vpnclient-3des-4.7.00.0640.ebuild 2273
RMD160 90af189a1bf8effd88cfaf6d3e07dc764ed1da13 cisco-vpnclient-3des-4.7.00.0640.ebuild 2273
@@ -57,10 +61,10 @@ EBUILD cisco-vpnclient-3des-4.8.00.0490.ebuild 2131 RMD160 a4783083c30beaee1fb2d
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 14307 RMD160 181b45ba4016f4db49a47c23c2548224d33df23c SHA1 4abafd623c266945962654066c0c5c89d6e33b01 SHA256 529a82c43f44511976d23ce03d005f644e4a525d73facacc3749af7fa60ba998
-MD5 b44ba38c0835986738924ae70d90913d ChangeLog 14307
-RMD160 181b45ba4016f4db49a47c23c2548224d33df23c ChangeLog 14307
-SHA256 529a82c43f44511976d23ce03d005f644e4a525d73facacc3749af7fa60ba998 ChangeLog 14307
+MISC ChangeLog 14541 RMD160 e6c620e497c1858d9cc65325d9ba84ae134791aa SHA1 ef4f6a211d2c142e78295b69522ad3f32d9d767c SHA256 f0224de12a36765a89bec4c2dd615aecbbaf4cea377062b895bfab81a842ff86
+MD5 ac4cafe325c1cfbc7949a65633617d00 ChangeLog 14541
+RMD160 e6c620e497c1858d9cc65325d9ba84ae134791aa ChangeLog 14541
+SHA256 f0224de12a36765a89bec4c2dd615aecbbaf4cea377062b895bfab81a842ff86 ChangeLog 14541
MISC metadata.xml 757 RMD160 60c81426ce38824eb2302520f55c204e6d35c4fe SHA1 170b258b21c5260d39f9b24151a85895c4557763 SHA256 51156c87787b5b5c034cf46843c2d09e15c6c889699ec6df47bf4760d116e01a
MD5 d73f09763957ef63c1fd72fbce7f5163 metadata.xml 757
RMD160 60c81426ce38824eb2302520f55c204e6d35c4fe metadata.xml 757
@@ -81,9 +85,9 @@ MD5 b629ca886d55951825a39b009bb4f624 files/digest-cisco-vpnclient-3des-4.8.00.04
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)
+Version: GnuPG v2.0.6 (GNU/Linux)
-iD8DBQFG3aVmkT4lNIS36YERArY8AJwNNl941lfq28YJLMkTaS3MsHbyvwCgs+zy
-OX/w53PzA5OtrttR1I4xyNs=
-=W7v2
+iD8DBQFG4ZFZkT4lNIS36YERAuo+AJ9JrFejbvl6iffrBgS5I22o7j8AlgCfXN0t
+5mBQhOM4loO2xbRStTroYek=
+=Q9Ms
-----END PGP SIGNATURE-----
diff --git a/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.7.00.0640-r1.ebuild b/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.7.00.0640-r1.ebuild
index 33ffc42695a3..270d9bb7a2fa 100644
--- a/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.7.00.0640-r1.ebuild
+++ b/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.7.00.0640-r1.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.7.00.0640-r1.ebuild,v 1.1 2007/09/04 18:35:13 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/cisco-vpnclient-3des/cisco-vpnclient-3des-4.7.00.0640-r1.ebuild,v 1.2 2007/09/07 17:58:44 wolf31o2 Exp $
inherit eutils linux-mod
@@ -41,7 +41,7 @@ src_unpack () {
then
epatch ${FILESDIR}/${PV}-2.6.14.patch
fi
- epatch ${FILESDIR}/2.6.22.patch
+ epatch ${FILESDIR}/${PV}-2.6.22.patch
}
src_compile () {
diff --git a/net-misc/cisco-vpnclient-3des/files/4.7.00.0640-2.6.22.patch b/net-misc/cisco-vpnclient-3des/files/4.7.00.0640-2.6.22.patch
new file mode 100644
index 000000000000..eaf310a500ae
--- /dev/null
+++ b/net-misc/cisco-vpnclient-3des/files/4.7.00.0640-2.6.22.patch
@@ -0,0 +1,356 @@
+--- IPSecDrvOS_linux.c 2005-09-14 05:40:56.000000000 +0300
++++ IPSecDrvOS_linux.c 2007-07-14 13:25:53.150630303 +0300
+@@ -11,7 +11,7 @@
+ *
+ *
+ ***************************************************************************/
+-#include <linux/config.h>
++#include <linux/autoconf.h>
+ #include <linux/version.h>
+ #include <linux/vmalloc.h>
+ #include <linux/sched.h>
+--- frag.c 2005-09-14 05:40:56.000000000 +0300
++++ frag.c 2007-07-14 13:25:53.150630303 +0300
+@@ -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);
+--- interceptor.c 2005-09-14 05:40:56.000000000 +0300
++++ interceptor.c 2007-07-14 13:25:53.150630303 +0300
+@@ -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)
+ {
+--- linux_os.h 2005-09-14 05:40:56.000000000 +0300
++++ linux_os.h 2007-07-14 13:25:53.150630303 +0300
+@@ -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
+--- linuxcniapi.c 2007-07-14 13:31:21.152541062 +0300
++++ linuxcniapi.c 2007-07-14 13:29:40.151949943 +0300
+@@ -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>
+@@ -291,7 +294,11 @@
+ }
+ /* move the data into the packet */
+ do_gettimeofday(&stamp);
+- skb_set_timestamp(skb, &stamp);
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb->tstamp = timeval_to_ktime(stamp);
++ #else
++ skb_set_timestamp(skb,&stamp);
++ #endif
+
+ pIP = skb_put(skb, lpPacketDescriptor->uiPacketSize);
+
+@@ -321,8 +328,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;
+
+@@ -433,15 +445,29 @@
+
+ /* put the mac header on */
+ do_gettimeofday(&stamp);
+- skb_set_timestamp(skb, &stamp);
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++ skb->tstamp = timeval_to_ktime(stamp);
++ #else
++ skb_set_timestamp(skb,&stamp);
++ #endif
+
+ 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 */