Kernel 2.6.31-1 and vpnclient-linux-x86_64-4.8.02.0030-k9

Installation, configuration and troubleshooting of the Cisco VPN Client on Linux systems

Re: Kernel 2.6.31-1 and vpnclient-linux-x86_64-4.8.02.0030-k9

Postby sokai » Thu Oct 29, 2009 8:14 pm

Hi all,

after a lot of trouble with the posted diff(s) I made them by myself... :-|
So I think this forum isn't the _best_ place for exchanging code. Furthermore I think we can reduce the workload of Alexander if we collaborate...

Long story short:
I made a github repo where everybody can work with: http://github.com/sokai/vpnclient
(The changed and working code for kernel 2.6.31 you can find in the branch "2.6.31" - here: http://github.com/sokai/vpnclient/tree/2.6.31.)

Do you think that was a good idea? - Would you work with that repo?

Best regards and thanks in advance!
sofar|sokai
sokai
Private
Private
 
Posts: 2
Joined: Thu Oct 29, 2009 7:56 pm

Re: Kernel 2.6.31-1 and vpnclient-linux-x86_64-4.8.02.0030-k9

Postby jpcjpc69 » Tue Nov 24, 2009 6:24 pm

Help please! I don't have the understanding of diffing and patching that you guys have, yet I need to get VPN working on Ubuntu to log into work and my IT guy won't help me (Windows guy). I've followed the instructions I found from here:
http://www.lamnk.com/blog/vpn/how-to-in ... la-64-bit/

and everything went well until I tried to run 'sudo ./vpn_install' and then I got all the errors like: '
Code: Select all
/home/lamnk/vpnclient/interceptor.c: In function ‘interceptor_init’:
/home/lamnk/vpnclient/interceptor.c:132: error: ‘struct net_device’ has no member named ‘hard_start_xmit’


It seems you folks have outlined a solution, but I don't quite understand how to set it up. Can someone give me a few more clear steps please? Any help would be much appreciated!
Thanks!
jpcjpc69
Private
Private
 
Posts: 1
Joined: Tue Nov 24, 2009 6:19 pm

Re: Kernel 2.6.31-1 and vpnclient-linux-x86_64-4.8.02.0030-k9

Postby synoptyck » Mon Dec 21, 2009 10:44 am

g'day,
I've got similar trouble with 2.6.32, with that fix it works fine...

Code: Select all
--- interceptor.c       2009-10-07 20:22:56.000000000 +0200
+++ interceptor.c       2009-10-07 20:28:48.000000000 +0200
@@ -120,6 +120,14 @@
     .notifier_call = handle_netdev_event,
};

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+static const struct net_device_ops vpn_netdev_ops = {
+ .ndo_start_xmit = interceptor_tx,
+ .ndo_get_stats = interceptor_stats,
+ .ndo_do_ioctl = interceptor_ioctl,
+};
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
static int
#else
@@ -128,10 +136,13 @@
interceptor_init(struct net_device *dev)
{
     ether_setup(dev);
-
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+    dev->netdev_ops = &vpn_netdev_ops;
+    #else
     dev->hard_start_xmit = interceptor_tx;
     dev->get_stats = interceptor_stats;
     dev->do_ioctl = interceptor_ioctl;
+    #endif

     dev->mtu = ETH_DATA_LEN-MTU_REDUCTION;
     kernel_memcpy(dev->dev_addr, interceptor_eth_addr,ETH_ALEN);
@@ -268,8 +279,13 @@
     Bindings[i].original_mtu = dev->mtu;

     /*replace the original send function with our send function */
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+    Bindings[i].InjectSend = dev->netdev_ops->ndo_start_xmit;
+   // dev->netdev_ops->ndo_start_xmit = replacement_dev_xmit;
+       ((struct net_device_ops *) (&dev->netdev_ops))->ndo_start_xmit = replacement_dev_xmit;
+    #else
     Bindings[i].InjectSend = dev->hard_start_xmit;
     dev->hard_start_xmit = replacement_dev_xmit;
+    #endif

     /*copy in the ip packet handler function and packet type struct */
     Bindings[i].InjectReceive = original_ip_handler.orig_handler_func;
@@ -291,7 +307,11 @@
     if (b)
     {
         rc = 0;
+        #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+        dev->netdev_ops->ndo_start_xmit = b->InjectSend;
+       ((struct net_device_ops *) (&dev->netdev_ops))->ndo_start_xmit = b->InjectSend;
+        #else
         dev->hard_start_xmit = b->InjectSend;
+        #endif
         kernel_memset(b, 0, sizeof(BINDING));
     }
     else


p.s. anybody tries vpnclient with RT kernels?
synoptyck
Private
Private
 
Posts: 3
Joined: Wed Feb 04, 2009 3:43 pm

Re: Kernel 2.6.31-1 and vpnclient-linux-x86_64-4.8.02.0030-k9

Postby brko » Sat Feb 13, 2010 7:30 pm

Works great for me as per instructions on following site (OpenSuse 11.2):
http://www.lamnk.com/blog/vpn/how-to-in ... la-64-bit/
brko
Private
Private
 
Posts: 3
Joined: Wed Feb 11, 2009 12:15 pm

Re: Kernel 2.6.31-1 and vpnclient-linux-x86_64-4.8.02.0030-k9

Postby johnlumby » Tue Feb 16, 2010 6:14 pm

Wow what a helpful forum! Thanks.

Not sure if this is the correct place to post - but -
after applying the various patches for my single-processor 32-bit x86 running linux kernel 2.6.31.6 and getting it working with (so far) no freeze or problem -

I found one bug in linuxcniapi.c that does not seem to have been fixed in any of the patches I came across -
It's actually the same coding mistake as was found in interceptor.c and corrected in
http://projects.tuxx-home.at/ciscovpn/c ... ux/4.8.02/

here is my additional patch for linuxcniapi.c for what it's worth :

--- linuxcniapi.c.orig 2008-06-23 12:59:12.000000000 -0400
+++ linuxcniapi.c 2010-02-13 21:17:28.000000000 -0500
@@ -577,7 +577,7 @@ CniGetBindingByIndex(IN INT iIndex)
{
int i;

- for (i=0; i <= MAX_INTERFACES; i++)
+ for (i=0; i < MAX_INTERFACES; i++)
{
BINDING *b = &Bindings[i];
if (b->pDevice && (iIndex == b->pDevice->ifindex))
johnlumby
Private
Private
 
Posts: 1
Joined: Tue Feb 16, 2010 5:55 pm

Re: Kernel 2.6.31-1 and vpnclient-linux-x86_64-4.8.02.0030-k

Postby yuki070 » Fri Jan 07, 2011 3:58 am

Hi all,

I try to make vpnclient-linux-x86_64-4.8.02.0030-k9 with kernel 2.6.35-24 results in the following errors:
Code: Select all
root@yuki-desktop:/home/yuki/download/vpnclient# ls
cisco_cert_mgr             frag.c              IPSecDrvOSFunctions.h  libvpnapi.so      linux_os.h       Module.symvers   vpnclient
Cniapi.h                   frag.h              IPSecDrvOS_linux.c     license.rtf       MacConnect.pcf   mtu.h            vpnclient.ini
config.h                   GenDefs.h           IPSecDrvOS_linux.h     license.txt       Makefile         sample.pcf       vpnclient_init
cvpnd                      interceptor.c       ipseclog               linuxcniapi.c     McMasterVPN.pcf  unixcniapi.h     vpn_install
diff_for_2.6.31-rc9.patch  interceptor.c.new   libdriver64.so         linuxcniapi.h     Module.markers   unixkernelapi.h  vpn_ioctl_linux.h
driver_build.sh            interceptor.c.orig  libdriver.so           linuxkernelapi.c  modules.order    vpnapi.h         vpn_uninstall

root@yuki-desktop:/home/yuki/download/vpnclient# make
make -C /lib/modules/2.6.35-24-generic/build SUBDIRS=/home/yuki/download/vpnclient modules
make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.35-24-generic'
  CC [M]  /home/yuki/download/vpnclient/linuxcniapi.o
/home/yuki/download/vpnclient/linuxcniapi.c:14: fatal error: linux/autoconf.h: 没有那个文件或目录
compilation terminated.
make[2]: *** [/home/yuki/download/vpnclient/linuxcniapi.o] 错误 1
make[1]: *** [_module_/home/yuki/download/vpnclient] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.35-24-generic'
make: *** [default] 错误 2


I want a help ,thanks.
yuki070
Private
Private
 
Posts: 1
Joined: Fri Jan 07, 2011 3:52 am

Previous

Return to Cisco VPN Client on Linux systems

Who is online

Users browsing this forum: No registered users and 6 guests

cron