When trying to compile the Cisco VPN client net-misc/cisco-vpnclient-3des-4.8.00.0490-r1 when using the gentoo-sources-2.6.34-r1 kernel, the following error occurs: make -C /usr/src/linux SUBDIRS=/var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient modules make[1]: Entering directory `/usr/src/linux-2.6.34-gentoo-r1' CC [M] /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/linuxcniapi.o /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/linuxcniapi.c:15:28: error: linux/autoconf.h: No such file or directory make[2]: *** [/var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/linuxcniapi.o] Error 1 make[1]: *** [_module_/var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.34-gentoo-r1' make: *** [default] Error 2 Both packages are marked stable, but it seems to me that the VPN client will need a patch to work with newer kernels. It should be marked testing, if this is not possible. I know about vpnc, but it has connection stability issues, which are unrelated to this bug report. Reproducible: Always Steps to Reproduce: emerge cisco-vpnclient-3des
Looks like the solution is explained in bug #296272 comment #6 Version 4.8.01.0640 is affected too, I'll try to give a patch this week-end is nobody have done it before.
Thanks for the info. I copied the ebuild to the local overlay and updated the file referencing the linux/autogen.h header to reference generated/autogen.h. Now I get further with the compilation, but there seem to be more header file changes in later kernel versions, because some struct members are not recognized. make -C /usr/src/linux SUBDIRS=/var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient modules make[1]: Entering directory `/usr/src/linux-2.6.34-gentoo-r1' CC [M] /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/linuxcniapi.o CC [M] /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/frag.o CC [M] /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/IPSecDrvOS_linux.o CC [M] /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.o /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c: In function 'interceptor_init': /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:135: error: 'struct net_device' has no member named 'hard_start_xmit' /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:136: error: 'struct net_device' has no member named 'get_stats' /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:137: error: 'struct net_device' has no member named 'do_ioctl' /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c: In function 'add_netdev': /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:275: error: 'struct net_device' has no member named 'hard_start_xmit' /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:276: error: 'struct net_device' has no member named 'hard_start_xmit' /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c: In function 'remove_netdev': /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:298: error: 'struct net_device' has no member named 'hard_start_xmit' /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c: In function 'handle_vpnup': /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:342: warning: assignment from incompatible pointer type /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:366: warning: assignment from incompatible pointer type /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:367: warning: assignment from incompatible pointer type /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c: In function 'do_cleanup': /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.c:419: warning: assignment from incompatible pointer type make[2]: *** [/var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient/interceptor.o] Error 1 make[1]: *** [_module_/var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r1/work/vpnclient] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.34-gentoo-r1' make: *** [default] Error 2
Created attachment 243757 [details, diff] 2.6.31.patch Comming from https://supportforums.cisco.com/message/3070143 The patch applies well with gentoo-sources:2.6.32-r7, it correct most errors. The second step of the procedure given from the cisco forums *requires* to change the kernel headers, by running sed -i 's/const\ struct\ net_device_ops\ \*netdev_ops;/struct\ net_device_ops\ \*netdev_ops;/' `find /usr/src/linux -name netdevice.h` It just removes the const keyword, which is only used by GCC in fact. I think that making a copy of the kernel header, then modifying it, and making sure the interceptor will use the modified copy, and not the original one would be much more preferable than sed-ing a kernel header (which finally would result in a sandbox violation)
I started more tests, the compiles is successful (but warnings) for kernel version 2.6.30, and fails from 2.6.31, with the last patch, with: CC [M] /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.o /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c: In function ‘add_netdev’: /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c:288: error: assignment of read-only location ‘*dev->netdev_ops’ /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c: In function ‘remove_netdev’: /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c:315: error: assignment of read-only location ‘*dev->netdev_ops’ /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c: In function ‘handle_vpnup’: /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c:362: warning: assignment from incompatible pointer type /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c:386: warning: assignment from incompatible pointer type /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c:387: warning: assignment from incompatible pointer type /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c: In function ‘do_cleanup’: /var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.c:439: warning: assignment from incompatible pointer type make[2]: *** [/var/tmp/portage/net-misc/cisco-vpnclient-3des-4.8.00.0490-r2/work/vpnclient/interceptor.o] Error 1 The struct net_device_ops was const in 2.6.30, the 2.6.31 patch is wrong then.
Created attachment 243873 [details, diff] 2.6.31.patch v2 New patch, fix the build errors that the previous patch was not correcting. I failed to deeply understand what this code do with the InjectSend function pointer, compared to the net_devive_ops struct function pointers, which the v2 of this patch only affects. Testing is welcome, i'm currently doing mine
*** Warning: I have kernel panics on 2.6.32-r7! Use only if you want to help debugging First try, I started vpnclient daemon, vpnclient connect failed, then I *lost* all my network connections. Kernel panic when /etc/init.d/vpnclient stop The second panic occurred after /etc/init.f/vpnclient start; vpnclient connect
Created attachment 243923 [details, diff] 2.6.33.patch - Header move from linux/autoconf.h to generated/autoconf.h Ok. Last news, I managed to have my VPN connection working, using the two last patches (.31 and .33), and 2.6.34-r1 on my x86 laptop. However, the system have froze a few seconds after stopping the connection AND ran /etc/init.d/vpnclient stop. I'm going to set-up an overlay (as this package requires a maintainer), to put this stuff on
Thanks for your work Cyprien. I hope someone can get it into a more stable shape, for what I gather is not that usable ATM.
I can report the same kernel panic behavior with 2.6.36-gentoo-r5. The result is the same running uniprocessor mode or SMP.
(In reply to comment #9) > I can report the same kernel panic behavior with 2.6.36-gentoo-r5. > The result is the same running uniprocessor mode or SMP. Try vpnc from bug #336012 and optionally patch the script from bug #331445 .
I recompiled vpnc with the suggested patches, but it doesn't solve my problem: lifetime status: 0 of 3600 seconds used, 0|0 of 4608000 kbytes used I already noticed that it always stopped working after exactly one hour, just didn't know why. Now I know. Looking at the vpnc ChangeLog it seems that was first fixed in 0.2 and then again in 0.5.3, but it still doesn't work for me. However, this is not a vpnc bug report, so I will not clutter it any more.
> (In reply to comment #8) > Thanks for your work Cyprien. I hope someone can get it into a more stable > shape, for what I gather is not that usable ATM. > I have stopped working on it. I have no longer a VPN access to test this package and patches. IMHO, 4.8.0[01] are far too old for new kernels, 4.8.02 was released last summer, the readme says it should be compatible with 2.6.22 and higher.
(In reply to comment #12) > > (In reply to comment #8) > > Thanks for your work Cyprien. I hope someone can get it into a more stable > > shape, for what I gather is not that usable ATM. > > > > I have stopped working on it. I have no longer a VPN access to test this > package and patches. > > IMHO, 4.8.0[01] are far too old for new kernels, 4.8.02 was released last > summer, the readme says it should be compatible with 2.6.22 and higher. Then I think =net-misc/cisco-vpnclient-3des-4.8.00.0490-r1 should not be marked stable anymore, since it doesn't work with recent stable kernels. If I'll have the time, I'll take look at patches available for 4.8.02 (it doesn't work out-of-the-box either).
+*cisco-vpnclient-3des-4.8.02.0030 (12 Feb 2012) + + 12 Feb 2012; Pacho Ramos <pacho@gentoo.org> + +cisco-vpnclient-3des-4.8.02.0030.ebuild, +files/4.8.02.0030-GenDefs.h.patch, + +files/4.8.02.0030-Makefile.patch, +files/4.8.02.0030-autoconf.patch, + +files/4.8.02.0030-frag.c.patch, +files/4.8.02.0030-interceptor.c.patch, + +files/4.8.02.0030-linuxcniapi.c.patch, + +files/4.8.02.0030-linuxcniapi.h.patch, + +files/4.8.02.0030-linuxkernelapi.c.patch, + -cisco-vpnclient-3des-4.8.01.0640.ebuild: + Version bump, thanks a lot to Rolando J. Zappacosta, Andreas Simon, Andrea + Postiglione, Matthew Schultz, JTRiley. Drop old. +