Re: Cisco vpnclient-linux 4.7.00.0640-k9 & kernel-2.6.14-1.1637_FC4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 12, 2005 at 12:07:31PM -0600, Erwin J. Prinz wrote:
> show that a structure "sk_buff" has changed the "stamp" field into 
> "tstamp" with a different type, going from 2.6.14 from 2.6.13. This 
> affects the function call to
>    extern void do_gettimeofday(struct timeval *tv);
> 
> in the file "linuxcniapi.c" in the vpnclient directory.
> 
> The enclosed patch file casts the types returned by do_gettimeofday into 
> the types required for skb->tstamp. There are still some warnings for 
> incompatible pointers in the file "interceptor.c". I think they are 
> related to the same structure. But, the compiled vpn seems to work 
> without the warnings.

Thanks very much for your patch.  Building on this work, I developed a
variation on this patch that I think is a bit more succinct/correct.  Also,
it will compile under kernel versions before or after the 2.6.14 skbuff
change.  I've attached the patch; hope it helps someone out.

-- 
Steve Snodgrass * ssnodgra@xxxxxxxxxx * Network and Unix Guru(?) at Large
Geek Code: GCS d? s: a C++ U++++$ P+++ L++ w PS+ 5++ b++ DI+ D++ e++ r+++ y+*
"If you want to be somebody else, change your mind."  -Sister Hazel
diff -ur vpnclient.orig/linuxcniapi.c vpnclient/linuxcniapi.c
--- vpnclient.orig/linuxcniapi.c	2005-09-13 22:40:56.000000000 -0400
+++ vpnclient/linuxcniapi.c	2005-11-15 15:43:36.000000000 -0500
@@ -289,7 +289,11 @@
         goto exit_gracefully;
     }
     /* move the data into the packet */
+#if LINUX_VERSION_CODE >= 132622
+    __net_timestamp(skb);
+#else
     do_gettimeofday(&skb->stamp);
+#endif
 
     pIP = skb_put(skb, lpPacketDescriptor->uiPacketSize);
 
@@ -429,7 +433,11 @@
     CniGetPacketData(Packet, 0, lpPacketDescriptor->uiPacketSize, pIP);
 
     /* put the mac header on */
+#if LINUX_VERSION_CODE >= 132622
+    __net_timestamp(skb);
+#else
     do_gettimeofday(&skb->stamp);
+#endif
 
     skb->dev = pBinding->pDevice;
 

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux