Kernel 2.6.29 + client 4.81.0640 causes crash

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

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby cesar_spain » Wed Jun 17, 2009 9:50 pm

I have written a script for Cisco VPN client installtion in Ubuntu 8.04. Since it is easy to understand, think it can be adjusted easily to other versions and distros. I am posting it here, hope tha helps.


Code: Select all
#!/bin/bash
#####################################
# INSTALL_VPN.SH
#####################################
#  Script for installing the Cisco
# VPN Client in Ubuntu 8.04 - 64 bits
#
#   It can be easily adapted for
# other distros and architectures
#####################################
# Author : Cesar Delgado Gonzalez
# Version: 1.0
# Date   : 10-March-2007
#####################################

##################################
# ENVIRONMENT
#################################

# 0.- General Variables
#----------------------
ERROR=1
OK=0
TRIES=1 # Attempts per Mirror

# 1.- Where to download
#----------------------
WORK_DIR=$HOME

# Syntax: Program - Mirror 1 - Mirror 2 ... Mirror N

# 64 bits Arch
PROGRAM=(vpnclient-linux-x86_64-4.8.01.0640-k9.tar.gz                 
         http://projects.tuxx-home.at/ciscovpn/clients/linux/4.8.01/  \
         http://www.longren.org/files/                                \
         )

# 32 bits Arch (not required, x86_64 source code works properly in i386 machines)
#PROGRAM=(vpnclient-linux-4.8.00.0490-k9.tar.gz                 \
#         http://projects.tuxx-home.at/ciscovpn/clients/linux/4.8.00/  \
#         http://www.longren.org/files/                                \
#         )


PATCH=(vpnclient-linux-2.6.24-final.diff             
       http://projects.tuxx-home.at/ciscovpn/patches/ \
       )

PATCH_2=(cisco_skbuff_offset.patch                     
         http://tuxx-home.at/projects/cisco-vpnclient/ \
        )

# 3.- Current Kernel Version
#---------------------------
KERNEL=`uname -r`
TYPE_KERNEL=`uname -r | awk 'BEGIN {FS="-";}{print $3}'`


################################################################################
# MODULE MISCELLANEOUS ====> GENERAL FUNCTIONS
################################################################################

#-----------------------------------------------------------------------
# AYUDA
#-----------------------------------------------------------------------
#  Muestra la ayuda por pantalla
#-----------------------------------------------------------------------

ayuda()
{
   echo "installVPN.sh --> Install Cisco VPN Client in Ubuntu 8.04"
   echo "  Best way to use it is through KVPNC, since it integrates it"
}


#-----------------------------------------------------------------------
# TRATA_ERRORES
#-----------------------------------------------------------------------
#   Trata todos los posibles errores del script.
#
#    Se considerar salida err ea a toda salida del script sin la creaci
#  de una estructura de datos (por ejm.: opcion -h provoca salida errea).
#
#     Variables de entrada:
#         $1 = Tipo de Error
#         $2 = Ruta a la que el usuario no tiene acceso (inexistencia o permisos)
#         $3 = Directorio de Trabajo
#-----------------------------------------------------------------------
trataErrores()
{

  ERROR="1"

  case $1 in
     -ayuda) # Solicitud de ayuda
            ayuda
        exit $ERROR;;

     -tryMirror)
        echo "===========> Trying PACKAGE: $3 "
        echo "               from MIRROR : $2 "
        echo;;

     -downloadSucceed)
        echo
        echo "*********************************************************************************"
        echo " Download succeed FOR  $3 "
        echo "                  FROM $2 "       
        echo "*********************************************************************************"
        echo ""  ;;

     -downloadFailed)
        echo
        echo "*********************************************************************************"
        echo "ERROR: PACKAGE $3 not found in"
        echo "       MIRROR  $2"
        echo "*********************************************************************************"
        echo "" ;;

     -noMirrors) # There is no mirrors for this package
         echo
         echo "*********************************************************************************"
         echo "ERROR ==> Package $2 has no mirror list"
         echo "*********************************************************************************"
         exit $ERROR;;


     -packageNotFound) # Package not found on any mirror
         echo
         echo "*********************************************************************************"
         echo "ERROR ==> Package $2 not found on any mirror of the list"
         echo "*********************************************************************************"
         exit $ERROR;;

     -requiredPack) # Failed installing required packages
         echo "ERROR ==> Can't install required packages: Linux source + Build Essentials"
         exit $ERROR;;
     
     -decompress)
           echo " ERROR ==> File / Directory Not Available => Unpack Failed, cleaning and exiting"
           cleanEnvironment
           exit $ERROR ;;

  esac
}

################################################################################
# MODULE DOWNLOAD ====> FUNCTIONS FOR DOWNLOADING THE PACKAGES
################################################################################

#-----------------------------------------------------------------------
#  DOWNLOAD PACKAGE
#-----------------------------------------------------------------------
#   Try to download one package
#  from several mirrors. If all of them
#  fails, return 1
#
#   $1 = Number of tries per mirror
#   $2 = Package to download
#   $3 ...  $N = List of mirrors
#-----------------------------------------------------------------------
downloadPackage () {


   # 1.- Check that exist at least one Mirror on the input List
   #-----------------------------------------------------------
   if [ $# = 2 ]; then
      trataErrores -noMirrors $2


   # 2.- Search for a the package on the mirrors list
   #-----------------------------------------------------------
   else

       POSITION=1
       for MIRROR in $@; do

          # 2.1.- Capture tries per mirror
          if [ $POSITION = 1 ]; then
               TRIES=$MIRROR

          # 2.2.- Capture package name
          elif [ $POSITION = 2 ]; then
               PACKAGE=$MIRROR

          # 2.3.- Try to get the package from current mirror
          else

                # Try the download
                trataErrores -tryMirror $MIRROR $PACKAGE
                `wget --tries=$TRIES $MIRROR$PACKAGE`

                # Check if succeed
              if [ $? = $OK ]; then
                   trataErrores -downloadSucceed $MIRROR$PACKAGE $PACKAGE
                   break;
                     
              fi

               # Report the fail
               trataErrores -downloadFailed $MIRROR$PACKAGE $PACKAGE

          fi

          # 2.4.- Incrementing position
          POSITION=`expr $POSITION + 1`

       done
   fi

   # 4.- Package not found of the list of mirrors
   #-----------------------------------------------------------
   if [ $POSITION = $# ] && [ $? != $OK ]; then
    trataErrores -packageNotFound $PACKAGE
   fi
}

#-----------------------------------------------------------------------
#  GET PACKAGES
#-----------------------------------------------------------------------
#   Downloading the packages
# from the current mirror
#-----------------------------------------------------------------------
getPackages() {

        echo  "================================================================================"
        echo  "                    DOWNLOADING CISCO VPN CLIENT "         
        echo  "================================================================================"
        echo
        downloadPackage $TRIES ${PROGRAM[*]}
         
        echo  "================================================================================"
        echo  "      DOWNLOADING UBUNTU PATCHES FOR KERNEL  = ${KERNEL} "
        echo  "================================================================================"
        echo
        downloadPackage $TRIES ${PATCH[*]}
        downloadPackage $TRIES ${PATCH_2[*]}
}

#-----------------------------------------------------------------------
#  INSTALL REQUIRED PACKAGES
#-----------------------------------------------------------------------
#   Procedure that install required
#-----------------------------------------------------------------------
installDependencies() {

     echo  "=============================================================================================="
     echo  " INSTALLING REQUIRED UBUNTU PACKAGES: linux kernel + build essentials + unpacking packages    "
     echo  "=============================================================================================="
     echo  " --> Command: "
     echo  " sudo apt-get install  linux-${TYPE_KERNEL} linux-headers-${KERNEL} build-essential gcc gzip bzip zip unzip rar unrar " 
     sudo apt-get install  linux-${TYPE_KERNEL} linux-headers-${KERNEL} build-essential gcc gzip bzip2 zip unzip rar unrar
     
     # Error Treatment
     if [ ! "$?" -eq "$OK" ] ; then
        trataErrores -requiredPack
     fi
}


################################################################################
# MODULE INSTALL ====> FUNCTIONS FOR COMPILING AND INSTALLING PROGRAM
################################################################################

#-----------------------------------------------------------------------
#  UNPACK PACKAGES
#-----------------------------------------------------------------------
#   Uncompress packages. Check file extension and uncompress
#  properly
#-----------------------------------------------------------------------
unpackPackages() {


   #----------------------
   # ENVIRONMENT
   #----------------------
   local OUT=$OK

   #----------------------
   # ACTIONS
   #----------------------

   # 0.- Tracing
   #---------------------
   echo  "================================================================================"
   echo  "             UNPACK PACKAGE: $1  "
   echo  "================================================================================"
   echo

   # 1.- Deflating File
   #------------------------------------------------------------
   echo "................................. FILE DECOMPRESSION .............................. "
   echo "File Extension: \${1##*.}=${1##*.}"
   local EXTENSION=${1##*.}
   echo "File Name: \${1%.*}=${1%.*}"
   FILENAME=${1%.*}

   case "$EXTENSION" in
     gz)  echo " ===> Decompress gz: gunzip -d $1"
          gunzip -d "$1" ; OUT="$?" ;;
     bz)  echo " ===> Decompress bz: bzip2 -d $1"
          bzip2 -d "$1"   ; OUT="$?" ;;
     zip) echo " ===> Decompress .zip: unzip $1"
          unzip "$1"     ; OUT="$?" ;;
     rar) echo " ===> Decompress .rar: unrar $1"
          unrar "$1"     ; OUT="$?" ;;
     *) FILENAME="$1" ;;
   esac

   # 2.- Unpacking File
   #------------------------------------------------------------
   if [ "$OUT" -eq "$OK" ]; then
        TAR=${FILENAME##*.}

        if [ -n $TAR ] ; then # ================> There is an extension to check

            if [ "$TAR" == "tar" ] ; then  # ====> Extension = .tar
                 echo ".............................. UNPACK TAR FILE .............................. "
                 
                 # 2.1.- Tar Base Detection
                 echo " ---> TAR base path detection: tar -tf ""$FILENAME"" | awk 'BEGIN {FS=""/""} {print $1}' | uniq"
                 TAR_BASE=`tar -tf "$FILENAME" | awk 'BEGIN {FS="/"} {print $1}' | uniq`
                 echo " TAR Base = $TAR_BASE"

                 # 2.2.- Unpacking Tar File
                 echo " --> Unpack .tar: tar-xvf $FILENAME"
                 tar xvf "$FILENAME"

                 # 2.3.- Returning Output path to File
                 local RUTA=`dirname $FILENAME`
                 FILENAME="${RUTA}/${TAR_BASE}"
                 OUT="$?"
            fi
        fi
   else
         trataErrores -decompress
   fi


   # 3.- Error Treatment
   #------------------------------------------------------------
   echo "................................... RESULTING FILE  ................................... "
   echo " Filename = $FILENAME "
   if [ -e $FILENAME ] && [ "$?" -eq "$OK" ] ; then
        echo " File / Directory Available     => Unpack OK"
   else
        trataErrores -decompress
   fi

}

#-----------------------------------------------------------------------
#  APPLY PATCHES
#-----------------------------------------------------------------------
#   Apply all Ubuntu specific patches
#-----------------------------------------------------------------------
applyPatches() {
     

   #----------------------
   # ACTIONS
   #----------------------
   
     echo  "================================================================================"
     echo  " APPLY PATCHES AND ADJUSTMENTS  "
     echo  "================================================================================"
     echo "cd ""${PROGRAM[0]}"""
     cd "${PROGRAM[0]}"


     # 1.- Adjusting MakeFile
     #---------------------
     echo " ......................... ADJUSTING MAKEFILE .............................. "
     echo " ========> > Replace CFLAGS to EXTRA_CFLAGS"
     echo "sudo sed -i 's/CFLAGS/EXTRA_CFLAGS/g'  ""${PROGRAM[0]}/Makefile"""
     sudo sed -i 's/CFLAGS/EXTRA_CFLAGS/g'              "${PROGRAM[0]}/Makefile"
     echo "sudo sed -i 's/EXTRA_EXTRA_CFLAGS/EXTRA_CFLAGS/g'  ""${PROGRAM[0]}/Makefile"""
     sudo sed -i 's/EXTRA_EXTRA_CFLAGS/EXTRA_CFLAGS/g'  "${PROGRAM[0]}/Makefile"
     
     echo
     echo "  Resulting MakeFile"
     cat ${PROGRAM[0]}/Makefile

     # 2.- Applying Patches
     #---------------------
     echo " ......................... APPLYING PATCHES .............................. "

     echo "......... sudo patch < ""${PATCH[0]}"""
     sudo patch < "${PATCH[0]}"

     echo "......... sudo patch < ""${PATCH_2[0]}"""
     sudo patch < "${PATCH_2[0]}"
}

#-----------------------------------------------------------------------
#  COMPILE PROGRAM
#-----------------------------------------------------------------------
#   Compile and install program
#-----------------------------------------------------------------------
compileProgram() {
     echo  "================================================================================"
     echo  " COMPILE AND INSTALL PROGRAM  "
     echo  "================================================================================"
     echo "cd ""${PROGRAM[0]}"""
     cd "${PROGRAM[0]}"
   
     echo " =======> Installing VPN Client"
     echo "......... sudo ""${PROGRAM[0]}/vpn_install"""
     sudo "${PROGRAM[0]}/vpn_install"

     if [ "$?" -eq "$OK" ] ; then
         echo " =======> Starting Cisco VPN Client"
         echo "......... sudo /etc/init.d/vpnclient_init start"
         sudo /etc/init.d/vpnclient_init start
     else
         trataErrores -installProgram
     fi
}

#-----------------------------------------------------------------------
#  CLEAN ENVIRONMENT
#-----------------------------------------------------------------------
#   Remove everything used
#-----------------------------------------------------------------------
cleanEnvironment() {

    echo  "================================================================================"
    echo  " CLEAN ENVIRONMENT  "
    echo  "================================================================================"

    echo "......... rm -R ${PROGRAM[0]}*"
    rm -fR ${PROGRAM[0]}*

    echo "......... rm ${PATCH[0]}*"
    rm -f ${PATCH[0]}*

    echo "......... rm ${PATCH_2[0]}*"
    rm -f ${PATCH_2[0]}*
}


#-----------------------------------------------------------------------
#  INSTALL PROGRAM
#-----------------------------------------------------------------------
#   "Public" procedure of module
#-----------------------------------------------------------------------
installProgram() {

     # 1.- Unpack files
     #-------------------
     unpackPackages "${WORK_DIR}/${PROGRAM[0]}"
     PROGRAM[0]="$FILENAME"
     unpackPackages "${WORK_DIR}/${PATCH[0]}"
     PATCH[0]="$FILENAME"
     unpackPackages "${WORK_DIR}/${PATCH_2[0]}"
     PATCH_2[0]="$FILENAME"

     # 2- Apply Ubuntu Specific modifications
     #-------------------
     applyPatches

     # 3.- Compile Program
     #-------------------
     compileProgram

     # 4.- Clean Environment
     #-------------------
     cleanEnvironment
}

################################################################################
# MAIN
################################################################################
cd $WORK_DIR
installDependencies
getPackages
installProgram
exit "$OK"
#------------------------------------------------------------------------------
#                             END INSTALL VPN
#------------------------------------------------------------------------------ 
cesar_spain
Private
Private
 
Posts: 2
Joined: Wed Jun 17, 2009 9:36 pm

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby tuxx-home.at » Fri Jun 19, 2009 11:25 am

Kernel panic for me too here, no working vpnclient on Linux 2.6.29 right now as it seems.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby ora4030 » Thu Jul 02, 2009 2:00 pm

Hi all,
having the same issue, also with the provided patch mentioned earlier in this thread.
Machine freezes with kernek 2.6.29 and 2.6.30 immediately as soon as established vpn connection is used.

Regards
ora4030
Private
Private
 
Posts: 1
Joined: Thu Jul 02, 2009 12:24 pm

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby varu0612 » Sat Jul 04, 2009 6:18 pm

tuxx-home.at wrote:Kernel panic for me too here, no working vpnclient on Linux 2.6.29 right now as it seems.


were you able to identify the issue? can you please let us know if you can fix it in the next few days?

Many thanks
varu0612
Private
Private
 
Posts: 6
Joined: Fri Jun 12, 2009 6:35 pm

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby themarkg » Sun Jul 05, 2009 7:57 am

I have the same problem as you are are reporting.
I updated to Fedora 11 from Fedora 10 where vpn
was working perfectly. I rebuilt the Cisco software.
It compiled fine once I located the kernel-headers.
I managed to log on but then my system froze when
I pinged remote machine. Had to power cycle.

I'm running 2.6.29.5-191.fc11.i586 which is a little newer
than what people are reporting.

Any chances of a fix? If not I need to dig into openvpn

Thanks
themarkg
Private
Private
 
Posts: 2
Joined: Sun Jul 05, 2009 7:46 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby themarkg » Sun Jul 05, 2009 8:35 am

tuxx-home.at wrote:No, this has nothing todo with AMD or P4, it's a bug in interceptor.c. There are two packages available, the one from t3x which is ONLY for AMD64 cpus on 64bit operating systems and the other one which is to be used for all other platforms and CPU types.

I have applied the one-byte fix to all releases, but since this doesn't help you, I'm running out of ideas right now.
Can you actually see the kernel panic that causes your system to freeze? Maybe after reboot then, can you check if the panic has been logged to the logfiles (/var/log/kern.log or /var/log/syslog or something like that)?


========================================================

I have the same problem as reported by others in that fedora 11 freezes once I
establish the connection. I downloaded you new release (and saw the interceptor.c
fix). It builds fine but the system still hangs when I ping an outside machine.
Ping to localhost works.

Everything was working fine with fc10 until I upgraded today to 2.6.29.5-191.fc11.i586.

I looked in the /var/log directory but didn't notice anything useful.
Perhaps it didn't log because it froze and I had to hard-reset my
machine.

Any suggestions?
Thanks
themarkg
Private
Private
 
Posts: 2
Joined: Sun Jul 05, 2009 7:46 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby mariuszs » Tue Jul 07, 2009 7:29 am

If you want to see crash message switch to fullscreen console (CTRL ALT F2) and then ping remote host.
mariuszs
Sergeant
Sergeant
 
Posts: 18
Joined: Wed May 20, 2009 6:59 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby xtom » Tue Jul 07, 2009 9:31 am

Hi here,

I have exactly same problem on my debian. When I use 2.6.29 or 2.6.30 compilation is without problem, connection also but using of the connection cause crash. With 2.6.28 its working fine but in debian is available only 2.6.26 and 2.6.29-30.

Thanks for any help.
xtom
Private
Private
 
Posts: 4
Joined: Sun Jun 07, 2009 12:00 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby patou » Wed Jul 08, 2009 2:01 am

hummmmm...

I am a newbie at Linux, and all these problems do nothing to help me switch from the "evil empire"'s OS (Windows). I just installed Fedora 11 x86_64 on my Dell D630 and I seem to be running into the same issues as everybody else...

Kernel : 2.6.29.5-191.fc11.x86_64
vpn client : vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz (with patch cisco_skbuff_offset.patch)

To make it work, I had to install glibc.i586 (32 bits support)

Everytime I try to hook up to my VPN server, my laptop just freezes and I have to do a hard reboot.

I tried the "one cpu fix" mentionned earlier and also tried to disable one cpu in BIOS, without any success.

I haven't found any logs mentionning the kernel crash yet.

any help would be appreciated.

Thanks
patou
Private
Private
 
Posts: 2
Joined: Wed Jul 08, 2009 1:36 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby boscharun » Sun Jul 12, 2009 12:00 pm

I had the same problem. The Cisco vpn instructions say PAE kernels are not supported. I tried installing non-pae kernel with fedora11 and it still showed the same symptoms. Finally, I tried to go with vpnc, the open source cisco compatible vpn client. Looks like you can configure it even with ssl/certificate support. Worked for me :mrgreen:
See the instructions here if you are interested in VPNC
http://www.toolsbysk.com/skforums/forum/Blah.pl?m-1247385296
boscharun
Private
Private
 
Posts: 1
Joined: Sun Jul 12, 2009 11:56 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby mariuszs » Tue Jul 28, 2009 5:37 pm

So, Im using 2.6.29.6-213.fc11.x86_64 and CISCO is working!!! This is what I saw before (look at viewtopic.php?f=15&t=773) but later I have switched to wire connection and have problems (crashes). Cisco work for me because Im using wireless connection :)

Code: Select all
Your VPN connection is secure.


CiscoVPN work on kernel 2.6.29 on WiFI without problem (network, pings etc). I am really enjoy.

This is also confirmed by jaustin on http://forums.fedoraforum.org/showthrea ... ost1247161.

Cheers ;)

Btw. Really strange behaviour :)
mariuszs
Sergeant
Sergeant
 
Posts: 18
Joined: Wed May 20, 2009 6:59 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby misterc » Sun Aug 02, 2009 8:48 pm

Hi -

I was looking closer at the bug.

There is a new net_device_ops, the cisco vpn is using the old one as is wlan0 - that probably explains why wifi is working (at least for a while).

Search the kernel for CONFIG_COMPAT_NET_DEV_OPS, and look at the code in net/core/dev.c - mainly register_netdevice(). then look at a recent network driver (like drivers/net/e1000/e1000_main.c, search for net_device_ops) to how the netdev_ops are now being set.

If you get messages like this (look in you /var/log/messages):
Code: Select all
    wmaster0 (iwlagn): not using net_device_ops yet
    wlan0 (iwlagn): not using net_device_ops yet


Then the cisco vpn might work (in my expurience for a while at least) on that device.

I haven't seen the actuall oopses out (for the ether or wifi).

I'm guessing for the oopses/hangs with ethernet: the new net_device_ops are causing problems. The cisco interceptor code is modifying the old xmit value that is no longer used. So, the original xmit function is called (not the interceptor.c b->InjectSend one), but the cisco vpn is still intercepting received packets (interceptor.c recv_ip_packet_handler()), and somehow that causes the hang.

I modified the cisco interceptor.c (for the version vpnclient-linux-x86_64-4.8.02.0030-k9) with the following patch, it also includes rather noisy debug printk's.

The vpn seems to connect, then I see packets go out, but none come back :-(

So, there is still some other changes needed to get it working.

I have to actually use the vpn (with an older kernel) and do some work ... but if anyone can make anyway headway here please post your results!

thanks ...

-- Mister C.

Note I tried to attach the patch, but the forum keeps complaining that the "extension" is not allowed, so here it is via cut and paste, hopefully intact, but the critical parts have the kernel version check for 2,6,28:

Code: Select all
--- orig-interceptor.c  2008-06-23 09:59:12.000000000 -0700
+++ interceptor.c   2009-08-02 11:17:18.000000000 -0700
@@ -129,6 +129,14 @@
{
     ether_setup(dev);

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+    /*
+     * The new netops should be used, but a compatibility mode can still be
+     * enabled and is at least for fedora 11 and probably all distros for
+     * now - see the config option CONFIG_COMPAT_NET_DEV_OPS, also search the
+     * kernel to see how it is being used.
+     */
+#endif
     dev->hard_start_xmit = interceptor_tx;
     dev->get_stats = interceptor_stats;
     dev->do_ioctl = interceptor_ioctl;
@@ -268,8 +276,20 @@
     Bindings[i].original_mtu = dev->mtu;

     /*replace the original send function with our send function */
+    printk("%s:%d %s fudging xmit\n", __FUNCTION__, __LINE__, dev->name);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+    Bindings[i].InjectSend = dev->netdev_ops->ndo_start_xmit;
+    /*
+     * This could cause problems - this was very bad before, but now we are
+     * (very likely) writing over const data here! I'm surprised this didn't
+     * oops for me. Hence the cast:
+     */
+    ((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
+    printk("%s:%d %s fudged the xmit\n", __FUNCTION__, __LINE__, dev->name);

     /*copy in the ip packet handler function and packet type struct */
     Bindings[i].InjectReceive = original_ip_handler.orig_handler_func;
@@ -291,7 +311,13 @@
     if (b)
     {
         rc = 0;
+        printk("%s:%d unfudging xmit for %s (%d)\n", __FUNCTION__, __LINE__, dev->name, dev->ifindex);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+        ((struct net_device_ops *) (&dev->netdev_ops))->ndo_start_xmit = b->InjectSend;
+#else
         dev->hard_start_xmit = b->InjectSend;
+#endif
+        printk("%s:%d unfudged xmit for %s (%d)\n", __FUNCTION__, __LINE__, dev->name, dev->ifindex);
         kernel_memset(b, 0, sizeof(BINDING));
     }
     else
@@ -551,6 +577,7 @@
     struct ethhdr ppp_dummy_buf;
     int hard_header_len;

+    printk("%s:%d %s received a packet\n", __FUNCTION__, __LINE__, dev->name);
#ifdef MOD_INC_AND_DEC
     MOD_INC_USE_COUNT;
#endif
@@ -626,6 +653,7 @@
        if (skb_checksum_help(&skb,1))
#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
        {
+           printk("%s:%d %s foo!\n", __FUNCTION__, __LINE__, dev->name);
            dev_kfree_skb(skb);
            skb = NULL;
            goto exit_gracefully;
@@ -650,6 +678,7 @@
         if ((hard_header_len < 0) || (hard_header_len > skb_headroom(skb)))
         {
             printk(KERN_DEBUG "bad hh len %d\n", hard_header_len);
+            printk("%s:%d %s foo!\n", __FUNCTION__, __LINE__, dev->name);
             hard_header_len = 0;
         }
     }
@@ -691,6 +720,7 @@
     switch (rc)
     {
     case CNI_CONSUME:
+        printk("%s:%d %s CNI_CONSUME\n", __FUNCTION__, __LINE__, dev->name);
         tmp_rc = CNICallbackTable.ReceiveComplete(pBinding,
                                                   lpReceiveContext, NewPacket);

@@ -702,6 +732,7 @@
         }
         break;
     case CNI_CHAIN:
+        printk("%s:%d %s CNI_CHAIN\n", __FUNCTION__, __LINE__, dev->name);
         tmp_rc = CNICallbackTable.ReceiveComplete(pBinding,
                                                   lpReceiveContext, NewPacket);

@@ -718,10 +749,12 @@

         break;
     case CNI_DISCARD:
+        printk("%s:%d %s CNI_DISCARD\n", __FUNCTION__, __LINE__, dev->name);
         dev_kfree_skb(skb);
         rx_dropped++;
         break;
     default:
+        printk("%s:%d %s default\n", __FUNCTION__, __LINE__, dev->name);
         printk(KERN_DEBUG "RECV: Unhandled case in %s rc was %x\n",
                __FUNCTION__, (uint) rc);

misterc
Private
Private
 
Posts: 4
Joined: Sun Aug 02, 2009 8:34 pm

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby tpugliese » Sun Aug 02, 2009 11:57 pm

Hello, everyone. I got tired of waiting for a fix for this problem so I finally broke down and put some serious effort into getting the free vpnc client up and running. It is confusing to set up but I found this page:

http://ubuntuforums.org/showthread.php?t=1227209

It gives step-by-step details on how to switch from the Cisco VPN client to the free vpnc client. There is even a utility to convert cisco .pcf profiles to the .conf format used by vpnc. Now, my vpn is working great and with the free version, you don't have to re-compile any modules when you upgrade the kernel.
tpugliese
Private
Private
 
Posts: 1
Joined: Sun Aug 02, 2009 11:50 pm

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby mariuszs » Mon Aug 03, 2009 6:45 am

tpugliese wrote:Hello, everyone. I got tired of waiting for a fix for this problem so I finally broke down and put some serious effort into getting the free vpnc client up and running. It is confusing to set up but I found this page:

http://ubuntuforums.org/showthread.php?t=1227209

It gives step-by-step details on how to switch from the Cisco VPN client to the free vpnc client. There is even a utility to convert cisco .pcf profiles to the .conf format used by vpnc. Now, my vpn is working great and with the free version, you don't have to re-compile any modules when you upgrade the kernel.

We are using CiscoVPN Client because we need cert to authenticate (not plain password). Your topic cant help us.
mariuszs
Sergeant
Sergeant
 
Posts: 18
Joined: Wed May 20, 2009 6:59 am

Re: Kernel 2.6.29 + client 4.81.0640 causes crash

Postby misterc » Mon Aug 03, 2009 7:06 am

mariuszs wrote:We are using CiscoVPN Client because we need cert to authenticate (not plain password). Your topic cant help us.


Also, if you have to modify the version reported by the open vpnc client, it might not work right - errors will probably be logged on the server side.

-- Mister C.
misterc
Private
Private
 
Posts: 4
Joined: Sun Aug 02, 2009 8:34 pm

PreviousNext

Return to Cisco VPN Client on Linux systems

Who is online

Users browsing this forum: No registered users and 3 guests

cron