LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 04-12-2004, 08:22 AM   #1
C++Boar
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Gentoo
Posts: 68

Rep: Reputation: 16
Lightbulb cisco vpn client with kernel 2.6.3 (mdk10) works


This is about getting (a cisco) vpn-client to work with mandrake 10 with the kernel (2.6.3)

Again I have spend hours looking for a solution - and as often the solution is on the net. I have posted it here to try to help others. (because my ATI post with nforce2 has been read a lot.)

I found the solution on http://www.anomalistic.org/

The earliest (and when I write this) only working version of (cisco)-vpn to 2.6.3 is
version 4.0.3.B

It can be taken from.
http://www.anomalistic.org/vpnclient....3.B-k9.tar.gz
http://www.nus.edu.sg/vpn/download/n....3.B-k9.tar.gz

older versions (eg vpnclient-linux-4.0.1.A-k9.tar.gz) does not work.
When compiling it comes with errors like
interceptor.c:325: error: structure has no member named `next'
interceptor.c:330: error: structure has no member named `next'

Before you start you need a patchfile. Put the follwoing into a file named eg
deadlock.patch

diff -u --recursive vpnclient/interceptor.c vpnclient-new/interceptor.c
--- vpnclient/interceptor.c 2003-10-30 02:27:34.000000000 +0100
+++ vpnclient-new/interceptor.c 2004-02-24 21:26:36.000000000 +0100
@@ -364,11 +364,6 @@
error = VPNIFUP_FAILURE;
goto error_exit;
}
- error = register_netdevice_notifier(&interceptor_notifier);
- if (error)
- {
- goto error_exit;
- }

vpn_is_up = TRUE;
return error;
@@ -388,8 +383,6 @@
{
int i;

- unregister_netdevice_notifier(&interceptor_notifier);
-
cleanup_frag_queue();
/*restore IP packet handler */
if (original_ip_handler.pt != NULL)
@@ -436,6 +429,9 @@
{
struct net_device *dev = (struct net_device *) val;

+ if (!vpn_is_up)
+ return 1;
+
switch (event)
{
case NETDEV_REGISTER:
@@ -853,6 +849,8 @@
CNICallbackTable = *PCNICallbackTable;
CniPluginDeviceCreated();

+ register_netdevice_notifier(&interceptor_notifier);
+
if ((status = register_netdev(&interceptor_dev)) != 0)
{
printk(KERN_INFO "%s: error %d registering device \"%s\".\n",
@@ -876,6 +874,9 @@
CniPluginUnload();

unregister_netdev(&interceptor_dev);
+
+ unregister_netdevice_notifier(&interceptor_notifier);
+
return;
}


su
tar -xvzf vpnclient-linux-4.0.3.B-k9.tar.gz
cp deadlock.patch vpnclient
cd vpnclient
patch -p1 < deadlock.patch
./vpn_install

and cisco-vpn-client is working.
Notice however that kernel 2.6 is (officially) not yet supported ...

Last edited by C++Boar; 04-15-2004 at 11:22 AM.
 
Old 04-15-2004, 07:10 AM   #2
kahler
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
Hello C++Boar,

I just tried your patch for the Cisco VPN Client but it didn't work for me. Maybe you can tell me what I did wrong or give me another idea on how to setup the Cisco VPN Client unter the 2.6 kernel tree.
The errormessage is as follows:
Code:
vpnclient-patched # patch -p1 < vpn-kernel-2.6.patch
patching file interceptor.c
patch: **** malformed patch at line 5: error = VPNIFUP_FAILURE;
Thanks in advance,

Kahler

Last edited by kahler; 04-18-2004 at 06:03 AM.
 
Old 04-15-2004, 11:21 AM   #3
C++Boar
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Gentoo
Posts: 68

Original Poster
Rep: Reputation: 16
I have no idea why that should not work. I did exactly as written above
You are sure that you don't have a newer version than me ?
(I dont know if there exists anything newer)

But here is the code after the patch for interceptor.c

I hope it will do.

C++Boar


/**************************************************************************
* Copyright (c) 2001, Cisco Systems, All Rights Reserved
***************************************************************************
*
* File: interceptor.c
* Date: 04/10/2001
*
***************************************************************************
* This module implements the linux driver.
***************************************************************************/
#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/in.h>
#include <linux/ppp_defs.h>
#include <net/ip.h>
#include <linux/ip.h>
#include <linux/udp.h>
#include <net/protocol.h>

#include "linux_os.h"

#include "vpn_ioctl_linux.h"
#include "Cniapi.h"
#include "linuxcniapi.h"
#include "frag.h"

/*methods of the cipsec network device*/
static int interceptor_init(struct net_device *);
static struct net_device_stats *interceptor_stats(struct net_device *dev);
static int interceptor_ioctl(struct net_device *dev, struct ifreq *ifr,
int cmd);
static int interceptor_open(struct net_device *dev);
static int interceptor_stop(struct net_device *dev);
static int interceptor_tx(struct sk_buff *skb, struct net_device *dev);

/*helper functions*/
static BINDING *getbindingbydev(struct net_device *dev);
static void do_cleanup();
static int handle_vpnup();
static int handle_vpndown();
static CNIFRAGMENT build_ppp_fake_mac_frag(struct ethhdr *dummy);
static int inline supported_device(struct net_device *dev);
int inline ippp_dev(struct net_device *dev);

/*packet handler functions*/
static int recv_ip_packet_handler(struct sk_buff *skb,
struct net_device *dev,
struct packet_type *type);
static int replacement_dev_xmit(struct sk_buff *skb, struct net_device *dev);

static int handle_netdev_event(struct notifier_block *self, unsigned long,
void *);

struct packet_type_funcs
{
struct packet_type *pt;
int (*orig_handler_func) (struct sk_buff *, struct net_device *,
struct packet_type *);
};
static struct packet_type_funcs original_ip_handler;
uint8 ppp_fake_lcl_addr[ETH_ALEN] = { 45, 45, 45, 45, 45, 45 };

extern CNI_CHARACTERISTICS CNICallbackTable; /* This stores the Plugin's function pointers */
extern PCHAR pcDeviceName; /* Ignore. Only our pluggin so we don't care about it */

static int vpn_is_up = FALSE;

static int tx_packetcount = 0;
static int rx_packetcount = 0;

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
#define interceptor_name LINUX_VPN_IFNAME
#else
static char interceptor_name[] = LINUX_VPN_IFNAME;
#endif

BINDING Bindings[MAX_INTERFACES];

static struct net_device interceptor_dev = {
.name = interceptor_name,
.init = interceptor_init
};
static struct notifier_block interceptor_notifier = {
.notifier_call = handle_netdev_event,
};

static int __init
interceptor_init(struct net_device *dev)
{
dev->open = interceptor_open;
dev->stop = interceptor_stop;
dev->hard_start_xmit = interceptor_tx;
dev->get_stats = interceptor_stats;
dev->do_ioctl = interceptor_ioctl;


dev->type = ARPHRD_ETHER;
dev->hard_header_len = ETH_HLEN;
dev->mtu = 1400; /* eth_mtu */
dev->addr_len = ETH_ALEN;
dev->tx_queue_len = 100; /* Ethernet wants good queues */

dev->flags = IFF_BROADCAST | IFF_MULTICAST;
memset(dev->broadcast, 0xFF, ETH_ALEN);

return 0;
}

static struct net_device_stats *
interceptor_stats(struct net_device *dev)
{
static struct net_device_stats es;


es.rx_packets = rx_packetcount;
es.rx_errors = 0;
es.rx_dropped = 0;
es.rx_fifo_errors = 0;
es.rx_length_errors = 0;
es.rx_over_errors = 0;
es.rx_crc_errors = 0;
es.rx_frame_errors = 0;
es.tx_packets = tx_packetcount;
es.tx_errors = 0;
es.tx_dropped = 0;
es.tx_fifo_errors = 0;
es.collisions = 0;
es.tx_carrier_errors = 0;
es.tx_aborted_errors = 0;
es.tx_window_errors = 0;
es.tx_heartbeat_errors = 0;

return (&es);
}

static int
interceptor_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
int error = 0;
static struct ifvpncmd command;

#ifdef MOD_INC_AND_DEC
MOD_INC_USE_COUNT;
#endif
switch (cmd)
{
case SIOCGVPNCMD:
{
uint32 ret_size;

char *from = (char *) ifr->ifr_ifru.ifru_data;
error = copy_from_user(&command, from, sizeof(struct ifvpncmd));
if (error)
{
break;
}

error = CniPluginIOCTL(command.cmd, (void *) command.data,
command.datalen, sizeof(command.data),
&ret_size);

if (!error)
{
command.datalen = ret_size;
}
else
{
//XXX set error to a real error value!!!! -E?????
command.datalen = 0;
}

error = copy_to_user(from, &command, sizeof(struct ifvpncmd));
}
break;

case SIOCGVPNIFUP:
error = handle_vpnup();
break;

case SIOCGVPNIFDOWN:
error = handle_vpndown();
break;

default:
error = -EOPNOTSUPP;
break;
}

#ifdef MOD_INC_AND_DEC
MOD_DEC_USE_COUNT;
#endif
return error;
}

static int
interceptor_open(struct net_device *dev)
{
/*stub. our network interface shouldn' ever come up */
return 1;
}

static int
interceptor_stop(struct net_device *dev)
{
/*stub. our network interface shouldn' ever come up */
return 1;
}

static int
interceptor_tx(struct sk_buff *skb, struct net_device *dev)
{
dev_kfree_skb(skb);
return 0;
}
static int
add_netdev(struct net_device *dev)
{
int rc = -1;
int i = 0;

if (!supported_device(dev))
{
goto exit_gracefully;
}

for (i = 0; i < MAX_INTERFACES; i++)
{
if (Bindings[i].pDevice == NULL)
{
break;
}
}
if (i >= MAX_INTERFACES)
{
printk(KERN_DEBUG "%s:exceeded max network devices (%d) at dev %s (%d)",
__FUNCTION__, MAX_INTERFACES, dev->name, dev->ifindex);
rc = -1;
goto exit_gracefully;
}

Bindings[i].pDevice = dev;
/* store the original mtu for this device. */
Bindings[i].original_mtu = dev->mtu;

/*replace the original send function with our send function */
Bindings[i].InjectSend = dev->hard_start_xmit;
dev->hard_start_xmit = replacement_dev_xmit;

/*copy in the ip packet handler function and packet type struct */
Bindings[i].InjectReceive = original_ip_handler.orig_handler_func;
Bindings[i].pPT = original_ip_handler.pt;

rc = 0;

exit_gracefully:
return rc;
}
static int
remove_netdev(struct net_device *dev)
{
int rc = -1;
BINDING *b;

b = getbindingbydev(dev);

if (b)
{
rc = 0;
dev->hard_start_xmit = b->InjectSend;
memset(b, 0, sizeof(BINDING));
}
else
{
printk(KERN_DEBUG "%s: missing dev %s (%d)", __FUNCTION__,
dev->name, dev->ifindex);
}
return rc;
}
static int
handle_vpnup(void)
{
/*temporary structure used to retrieve the registered ip packet handler.
*it is static because it gets inserted temporarily into a kernel hash
*table and if things went incredibly wrong it could end up staying there
*/
static struct packet_type dummy_pt;

struct net_device *dp = NULL;
struct packet_type *default_pt = NULL;
int error = VPNIFUP_SUCCESS, num_target_devices;

cleanup_frag_queue();

#ifdef MOD_INC_AND_DEC
MOD_INC_USE_COUNT;
#else
if (!try_module_get(THIS_MODULE))
{
return -EBUSY;
}
#endif
if (vpn_is_up)
{
error = VPNIFUP_FAILURE;
return error;
}

/* find the handler for inbound IP packets by adding a dummy handler
* for that packet type into the kernel. Because the packet handlers
* are stored in a hash table, we'll be able to pull the original
* ip packet handler out of the list that dummy_pt was inserted into.*/
memset(&dummy_pt, 0, sizeof(dummy_pt));
dummy_pt.type = htons(ETH_P_IP);
dummy_pt.func = recv_ip_packet_handler;

dev_add_pack(&dummy_pt);
/* this should be the original IP packet handler */
default_pt = PACKET_TYPE_NEXT(&dummy_pt);
/* there may be more than one other packet handler in our bucket,
* so look through all the buckets */
while (default_pt != NULL && default_pt->type != htons(ETH_P_IP))
{
default_pt = PACKET_TYPE_NEXT(default_pt);
}
if (!default_pt)
{
printk(KERN_DEBUG "No default handler found for %x protocol!!\n",
dummy_pt.type);
dev_remove_pack(&dummy_pt);
error = VPNIFUP_FAILURE;
goto error_exit;
}
/*remove the dummy handler handler */
original_ip_handler.pt = default_pt;
dev_remove_pack(&dummy_pt);

/*and replace the original handler function with our function */
original_ip_handler.orig_handler_func = original_ip_handler.pt->func;
original_ip_handler.pt->func = recv_ip_packet_handler;

/* identify the active network devices */
memset(&Bindings, 0, sizeof(Bindings));

dp = NULL;
num_target_devices = 0;
for (dp = dev_base; dp != NULL; dp = dp->next)
{
if (add_netdev(dp) == 0)
{
num_target_devices++;
}
}

if (num_target_devices == 0)
{
printk(KERN_DEBUG "No network devices detected.\n");
error = VPNIFUP_FAILURE;
goto error_exit;
}

vpn_is_up = TRUE;
return error;

error_exit:
do_cleanup();
vpn_is_up = FALSE;
#ifdef MOD_INC_AND_DEC
MOD_DEC_USE_COUNT;
#else
module_put(THIS_MODULE);
#endif
return error;
}
static void
do_cleanup(void)
{
int i;

cleanup_frag_queue();
/*restore IP packet handler */
if (original_ip_handler.pt != NULL)
{
original_ip_handler.pt->func = original_ip_handler.orig_handler_func;
}
memset(&original_ip_handler, 0, sizeof(original_ip_handler));

/*restore network devices */
for (i = 0; i < MAX_INTERFACES; i++)
{
struct net_device *dev = Bindings[i].pDevice;
if (dev)
{
remove_netdev(dev);
}
}
memset(&Bindings, 0, sizeof(Bindings));
}
static int
handle_vpndown(void)
{
int error = VPNIFDOWN_SUCCESS;

if (!vpn_is_up)
{
error = VPNIFDOWN_FAILURE;
goto exit_gracefully;
}
do_cleanup();

vpn_is_up = FALSE;

#ifdef MOD_INC_AND_DEC
MOD_DEC_USE_COUNT;
#else
module_put(THIS_MODULE);
#endif
exit_gracefully:
return error;
}
static int
handle_netdev_event(struct notifier_block *self, unsigned long event, void *val)
{
struct net_device *dev = (struct net_device *) val;

if (!vpn_is_up)
return 1;

switch (event)
{
case NETDEV_REGISTER:
add_netdev(dev);
break;
case NETDEV_UNREGISTER:
remove_netdev(dev);
break;
default:
break;
}
return 0;
}

static void
reset_inject_status(inject_status * s)
{
s->called = FALSE;
s->rc = 0;
}

int inline
ippp_dev(struct net_device *dev)
{
/* This func does not check for syncPPP
Check for syncPPP must be done in addition to the checks in these
functions
*/

int rc = 0;

if (!dev->name)
{
goto exit_gracefully;
}

if (strncmp(dev->name, "ippp", 4))
{
goto exit_gracefully;
}

if (dev->name[4] < '0' || dev->name[4] > '9')
{
goto exit_gracefully;
}

rc = 1;

exit_gracefully:
return rc;
}

static int inline
supported_device(struct net_device *dev)
{
int rc = 0;

if (!dev->name)
{
goto exit_gracefully;
}

if (!strncmp(dev->name, "eth", 3)
&& (dev->name[3] >= '0' && dev->name[3] <= '9'))
{
rc = 1;
}
else if (!strncmp(dev->name, "wlan", 4)
&& (dev->name[4] >= '0' && dev->name[4] <= '9'))
{
rc = 1;
}
else if (!strncmp(dev->name, "ppp", 3) && (dev->name[3] >= '0' &&
dev->name[3] <= '9'))
{
rc = 1;
}
else if (ippp_dev(dev))
{
rc = 1;
}

exit_gracefully:
return rc;
}

static BINDING *
getbindingbydev(struct net_device *dev)
{
int i;

for (i=0; i <= MAX_INTERFACES; i++)
{
BINDING *b = &Bindings[i];
if (b->pDevice && (dev->ifindex == b->pDevice->ifindex))
{
return b;
}
}
return NULL;
}

static CNIFRAGMENT
build_ppp_fake_mac_frag(struct ethhdr *dummy)
{
CNIFRAGMENT MacHdr = NULL;

memset(dummy->h_dest, 45, ETH_ALEN);
memset(dummy->h_source, 45, ETH_ALEN);
dummy->h_proto = htons(ETH_P_IP);

CniNewFragment(ETH_HLEN, (char *) dummy, &MacHdr, CNI_USE_BUFFER);
return MacHdr;
}

static int
recv_ip_packet_handler(struct sk_buff *skb,
struct net_device *dev, struct packet_type *type)
{
int rc2 = 0;
int tmp_rc = 0;
CNISTATUS rc = 0;
CNIPACKET NewPacket = NULL;
CNIFRAGMENT Fragment = NULL;
CNIFRAGMENT MacHdr = NULL;
PVOID lpReceiveContext = NULL;
ULONG ulFinalPacketSize;
BINDING *pBinding = NULL;
struct ethhdr ppp_dummy_buf;
int hard_header_len;

#ifdef MOD_INC_AND_DEC
MOD_INC_USE_COUNT;
#endif
if (strcmp("lo", dev->name) == 0)
{
rc2 = original_ip_handler.orig_handler_func(skb, dev, type);
goto exit_gracefully;
}

/* Don't handle non-eth non-ppp packets */
if (!supported_device(dev))
{
rc2 = original_ip_handler.orig_handler_func(skb, dev, type);
goto exit_gracefully;
}

pBinding = getbindingbydev(dev);

/* if we don't have a binding, this is a new device that
* has been brought up while the tunnel is up. For now,
* just pass the packet
*/
if (!pBinding)
{
static int firsttime = 1;
if (firsttime)
{
printk(KERN_DEBUG "RECV: new dev %s detected\n", dev->name);
firsttime = 0;
}
rc2 = original_ip_handler.orig_handler_func(skb, dev, type);
goto exit_gracefully;
}

//only need to handle IP packets.
if (skb->protocol != htons(ETH_P_IP))
{
rc2 = original_ip_handler.orig_handler_func(skb, dev, type);
goto exit_gracefully;
}

reset_inject_status(&pBinding->recv_stat);
if (skb->mac.raw)
{
hard_header_len = skb->data - skb->mac.raw;
if ((hard_header_len < 0) || (hard_header_len > skb_headroom(skb)))
{
printk(KERN_DEBUG "bad hh len %d\n", hard_header_len);
hard_header_len = 0;
}
}
else
{
hard_header_len = 0;
}

pBinding->real_hh_len = hard_header_len;

switch (hard_header_len)
{
case ETH_HLEN:
CniNewFragment(ETH_HLEN, skb->mac.raw, &MacHdr, CNI_USE_BUFFER);
break;
case IPPP_MAX_HEADER:
case 0:
MacHdr = build_ppp_fake_mac_frag(&ppp_dummy_buf);
break;
default:
printk(KERN_DEBUG "unknown mac header length (%d)\n", hard_header_len);
dev_kfree_skb(skb);
skb = NULL;
goto exit_gracefully;
}

CniNewFragment(skb->len, skb->data, &Fragment, CNI_USE_BUFFER);
ulFinalPacketSize = skb->len;

rc = CNICallbackTable.Receive((void *) &pBinding,
&lpReceiveContext,
&MacHdr,
&Fragment, &NewPacket, &ulFinalPacketSize);

switch (rc)
{
case CNI_CONSUME:
tmp_rc = CNICallbackTable.ReceiveComplete(pBinding,
lpReceiveContext, NewPacket);
dev_kfree_skb(skb);

if (pBinding->recv_stat.called)
{
rc2 = pBinding->recv_stat.rc;
rx_packetcount++;
}
break;
case CNI_CHAIN:
tmp_rc = CNICallbackTable.ReceiveComplete(pBinding,
lpReceiveContext, NewPacket);

rc2 = original_ip_handler.orig_handler_func(skb, dev, type);

if (pBinding->recv_stat.called)
{
rc2 = pBinding->recv_stat.rc;
}

rx_packetcount++;
break;
case CNI_DISCARD:
dev_kfree_skb(skb);
break;
default:
printk(KERN_DEBUG "RECV: Unhandled case in %s rc was %x\n",
__FUNCTION__, (uint) rc);

dev_kfree_skb(skb);
}
exit_gracefully:
if (MacHdr)
{
CniReleaseFragment(MacHdr, CNI_KEEP_BUFFERS);
}
if (Fragment)
{
CniReleaseFragment(Fragment, CNI_KEEP_BUFFERS);
}
#ifdef MOD_INC_AND_DEC
MOD_DEC_USE_COUNT;
#endif
return rc2;
}

int
do_cni_send(BINDING * pBinding, struct sk_buff *skb, struct net_device *dev)
{
int rc2 = 0;
CNISTATUS rc = 0;
CNIPACKET Packet = NULL;
CNIFRAGMENT Fragment = NULL;
CNIFRAGMENT MacHdr = NULL;
PVOID lpSendContext = NULL;
struct ethhdr ppp_dummy_buf;
int hard_header_len = 0;

reset_inject_status(&pBinding->send_stat);
hard_header_len = skb->nh.raw - skb->data;
pBinding->real_hh_len = hard_header_len;
switch (hard_header_len)
{
case ETH_HLEN:
CniNewFragment(ETH_HLEN, skb->data, &MacHdr, CNI_USE_BUFFER);
break;
case IPPP_MAX_HEADER:
case 0:
MacHdr = build_ppp_fake_mac_frag(&ppp_dummy_buf);
/* note: the PPP device says it's hard_header_len is 4,
* but skb->data points at the IP header*/
break;
default:
printk(KERN_DEBUG "unknown mac header length (%d)\n",
skb->dev->hard_header_len);
dev_kfree_skb(skb);
skb = NULL;
goto exit_gracefully;
}
CniNewPacket(0, &Packet);
/*skb->data points to the mac header, the fragment should start
*with the ip header */
CniNewFragment(skb->len - hard_header_len,
skb->data + hard_header_len, &Fragment, CNI_USE_BUFFER);

CniAddFragToFront(Packet, Fragment);

rc = CNICallbackTable.Send((void *) &pBinding,
&lpSendContext, &MacHdr, &Packet);

switch (rc)
{
case CNI_DISCARD:
/* packet was tunneled */
if (pBinding->send_stat.called)
{
rc2 = pBinding->send_stat.rc;

/*if the packet was tunneled, rc2 should
now contain the return code from the
call to the nic's hard_start_xmit function.
if that function failed, the kernel is going
to queue this skb and send it to us again later,
so don't free it. */
if (rc2 == 0)
{
dev_kfree_skb(skb);
}
}
/* packet dropped */
else
{
dev_kfree_skb(skb);
}
break;
case CNI_CHAIN:
rc2 = pBinding->InjectSend(skb, dev);
tx_packetcount++;
break;
default:
printk(KERN_DEBUG "Unhandled case in %s rc was %x\n", __FUNCTION__,
(uint) rc);

dev_kfree_skb(skb);
rc2 = 0;
}
exit_gracefully:
if (MacHdr)
{
CniReleaseFragment(MacHdr, CNI_KEEP_BUFFERS);
}
if (Packet)
{
CniReleasePacket(Packet, CNI_KEEP_BUFFERS);
}
return rc2;
}
static int
replacement_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
int rc2 = 0;
BINDING *pBinding = 0;

#ifdef MOD_INC_AND_DEC
MOD_INC_USE_COUNT;
#endif
pBinding = getbindingbydev(dev);
/* if we don't have a binding, this is a new device that
* has been brought up while the tunnel is up. For now,
* just drop the packet.
*/
if (!pBinding)
{
static int firsttime = 1;
if (firsttime)
{
printk(KERN_DEBUG "XMIT: new dev %s detected\n", dev->name);
firsttime = 0;
}
dev_kfree_skb(skb);
goto exit_gracefully;
}

//only need to handle IP packets.
if (skb->protocol != htons(ETH_P_IP))
{
rc2 = pBinding->InjectSend(skb, dev);
goto exit_gracefully;
}

if (need_reorder_frag(skb))
{
rc2 = handle_fragment(pBinding, skb, dev);
}
else
{
rc2 = do_cni_send(pBinding, skb, dev);
}
exit_gracefully:
#ifdef MOD_INC_AND_DEC
MOD_DEC_USE_COUNT;
#endif
return rc2;
}


int
interceptor_mod_init(void)
{
int status = 0;
PCNI_CHARACTERISTICS PCNICallbackTable;
CNISTATUS rc = CNI_SUCCESS;
rc = CniPluginLoad(&pcDeviceName, &PCNICallbackTable);

if (CNI_IS_SUCCESS(rc))
{

CNICallbackTable = *PCNICallbackTable;
CniPluginDeviceCreated();

register_netdevice_notifier(&interceptor_notifier);

if ((status = register_netdev(&interceptor_dev)) != 0)
{
printk(KERN_INFO "%s: error %d registering device \"%s\".\n",
LINUX_VPN_IFNAME, status, interceptor_dev.name);
CniPluginUnload();

}
}
if (status == 0)
{
printk(KERN_INFO "Cisco Systems VPN Client Version "
BUILDVER_STRING " kernel module loaded\n");
}
return (status);
}

void
interceptor_mod_cleanup(void)
{
cleanup_frag_queue();
CniPluginUnload();

unregister_netdev(&interceptor_dev);

unregister_netdevice_notifier(&interceptor_notifier);

return;
}

module_init(interceptor_mod_init);
module_exit(interceptor_mod_cleanup);
MODULE_LICENSE("Proprietary");
 
Old 04-15-2004, 02:51 PM   #4
kahler
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
As I'm a Gentoo User I found a package for the Gentoo Packagemanagement System Portage which applies the patches autmatically and works fine .
Thanks for your help anyways
 
Old 04-17-2004, 08:51 PM   #5
labradog
LQ Newbie
 
Registered: Mar 2004
Distribution: ubuntu
Posts: 29

Rep: Reputation: 15
C++Boar,

I tried the code you have posted and I could not get it to work but i went to http://www.anomalistic.org/ and downloaded vpnclient-deadlock-fix-4.0.3.B-k9.patch and it works great. Thanks for posting this. The vpn client is much more stable on 26 than 24.

Thanks for you help.

Brian
 
Old 04-17-2004, 08:55 PM   #6
eugeneteo
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Thanks C++Boar for linking my website.

The tarball from NUS is the same as what I have at my website, except that it contains additional configuration files that are only meant for NUS.

Also, the patch that C++Boar pasted is exactly the same as what I have put up at my website. Please give appropriate credits.

labradog, I am glad that it works for you. There might be some problems if it is used with the current snapshot in bitkeeper, which I will look at it after my final exams (after next thursday).

Thanks.

Eugene

Last edited by eugeneteo; 04-17-2004 at 08:58 PM.
 
Old 04-18-2004, 01:12 AM   #7
C++Boar
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Gentoo
Posts: 68

Original Poster
Rep: Reputation: 16
The reason I posted this was because It took a long for me to search the Internet.
(4 hours +)

(Since about 98,5% sites only told about problems (I also had) and only http://www.anomalistic.org/ had the solution).

It was my way not to take credit for other peoples work ....

But I am sorry that I did not mention 'Eugene Teo Research' and that it could have been understood as if I had made the patch. (Made by Gertjan)

Finally I would not even have posted this if it was not because I missed that your package has the patch included. (Maybe I would just have posted the link)

Sorry - and Good luck with your exams Eugene.
 
Old 04-18-2004, 01:19 AM   #8
eugeneteo
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Quote:
Originally posted by C++Boar
The reason I posted this was because It took a long for me to search the Internet.
(4 hours +)

(Since about 98,5% sites only told about problems (I also had) and only http://www.anomalistic.org/ had the solution).

It was my way not to take credit for other peoples work ....

But I am sorry that I did not mention 'Eugene Teo Research' and that it could have been understood as if I had made the patch. (Made by Gertjan)

Finally I would not even have posted this if it was not because I missed that your package has the patch included. (Maybe I would just have posted the link)

Sorry - and Good luck with your exams Eugene.
It is all right. We care, and that is why we share. And I am glad
that most of us, if not all, have this spirit

Thanks, I need a lot of luck for my final paper. I won't be able to
maintain the vpn client anymore after I graduate since I don't have
access to any vpn network anymore (in two months time).

Eugene
 
Old 04-18-2004, 08:38 PM   #9
labradog
LQ Newbie
 
Registered: Mar 2004
Distribution: ubuntu
Posts: 29

Rep: Reputation: 15
Well thanks eugene for doing the work but I'm sure glad C++boar posted it cause I would not have found it. Incedentially eugene, I loved the stuff about Xforwarding with windows. I have a nortel vpn I have to go through and your method did the trick.
 
Old 04-18-2004, 09:10 PM   #10
eugeneteo
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Quote:
Originally posted by labradog
Well thanks eugene for doing the work but I'm sure glad C++boar posted it cause I would not have found it. Incedentially eugene, I loved the stuff about Xforwarding with windows. I have a nortel vpn I have to go through and your method did the trick.
I like that one too
 
Old 04-23-2004, 04:14 AM   #11
valent_h
LQ Newbie
 
Registered: Apr 2004
Posts: 18

Rep: Reputation: 0
Talking Still have prob with Mandrake 10 2.6.3-4mdk Kernel

Hi Engene and Boar,
I am from NUS just like Engene. I am also in my last year. However my involvements in Freshman Camp requires me to be connected the School Network. In my school, the only way for connection to internet is thru the vpn....
And Just like Boar I seek answer on internet. However I downloaded vpnclient from NUS webpage and Engene's webpage. (On 23 Apr 2004) But it did not work with the Mandrake 10....
I have tried the patches Deadlock and Debian. But it indicated they are applied already.

Below is my error msg when run the install program...
Hope to hear from any one of you soon

Thanks
-----------------------------------------------------------------------------------------------------------
[root@ValentLap vpnclient]# ./vpn_install
Cisco Systems VPN Client Version 4.0.3 (B) Linux Installer
Copyright (C) 1998-2001 Cisco Systems, Inc. All Rights Reserved.

By installing this product you agree that you have read the
license.txt file (The VPN Client license) and will comply with
its terms.


Directory where binaries will be installed [/usr/local/bin]

Automatically start the VPN service at boot time [yes]

In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.

For RedHat 6.x users these files are installed in /usr/src/linux by default
For RedHat 7.x users these files are installed in /usr/src/linux-2.4 by default
For Suse 7.3 users these files are installed in /usr/src/linux-2.4.10.SuSE by default

Directory containing linux kernel source code [/lib/modules/2.6.3-4mdk/build]

* Binaries will be installed in "/usr/local/bin".
* Modules will be installed in "/lib/modules/2.6.3-4mdk/CiscoVPN".
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from "/lib/modules/2.6.3-4mdk/build" will be used to build the module.

Is the above correct [y]

Shutting down /usr/local/bin/vpnclient: module cisco_ipsec is not running.
Stopped: /etc/init.d/vpnclient_init (VPN init script)
Making module
In file included from linuxcniapi.c:13:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/cpumask.h:4,
from /lib/modules/2.6.3-4mdk/build/include/linux/cpumask.h:6,
from /usr/include/linux/sched.h:14,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from linuxcniapi.c:14:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:10:5: missing binary operator before token "("
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:34:5: missing binary operator before token "("
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/smp.h:18,
from /usr/include/linux/smp.h:13,
from /usr/include/linux/sched.h:22,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from linuxcniapi.c:14:
/lib/modules/2.6.3-4mdk/build/include/asm/mpspec.h:50: error: variable-size type declared outside of any function
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:7,
from /usr/include/linux/sched.h:24,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from linuxcniapi.c:14:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from /usr/include/linux/percpu.h:4,
from /usr/include/linux/sched.h:30,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from linuxcniapi.c:14:
/lib/modules/2.6.3-4mdk/build/include/linux/mmzone.h:338: error: parse error before '(' token
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/irq.h:16,
from /lib/modules/2.6.3-4mdk/build/include/linux/irq.h:20,
from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:501,
from linuxcniapi.c:14:
/lib/modules/2.6.3-4mdk/build/include/asm-i386/mach-default/irq_vectors.h:95:19: missing binary operator before token "("
In file included from linuxcniapi.c:22:
linux_os.h:18:40: missing binary operator before token "("
linux_os.h:23:40: missing binary operator before token "("
linux_os.h:27:41: missing binary operator before token "("
linux_os.h:33:41: missing binary operator before token "("
In file included from linuxcniapi.c:22:
linux_os.h:38: error: conflicting types for `copy_from_user'
/lib/modules/2.6.3-4mdk/build/include/asm/uaccess.h:497: error: previous declaration of `copy_from_user'
In file included from linuxcniapi.c:22:
linux_os.h:49: error: conflicting types for `copy_to_user'
/lib/modules/2.6.3-4mdk/build/include/asm/uaccess.h:472: error: previous declaration of `copy_to_user'
In file included from interceptor.c:12:
/usr/include/linux/version.h:2:2: #error
 
Old 04-23-2004, 04:15 AM   #12
valent_h
LQ Newbie
 
Registered: Apr 2004
Posts: 18

Rep: Reputation: 0
Continue of above msg

"======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/cpumask.h:4,
from /lib/modules/2.6.3-4mdk/build/include/linux/cpumask.h:6,
from /usr/include/linux/sched.h:14,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from interceptor.c:13:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:10:5: missing binary operator before token "("
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:34:5: missing binary operator before token "("
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/smp.h:18,
from /usr/include/linux/smp.h:13,
from /usr/include/linux/sched.h:22,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from interceptor.c:13:
/lib/modules/2.6.3-4mdk/build/include/asm/mpspec.h:50: error: variable-size type declared outside of any function
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:7,
from /usr/include/linux/sched.h:24,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from interceptor.c:13:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from /usr/include/linux/percpu.h:4,
from /usr/include/linux/sched.h:30,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from interceptor.c:13:
/lib/modules/2.6.3-4mdk/build/include/linux/mmzone.h:338: error: parse error before '(' token
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/irq.h:16,
from /lib/modules/2.6.3-4mdk/build/include/linux/irq.h:20,
from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:501,
from interceptor.c:16:
/lib/modules/2.6.3-4mdk/build/include/asm-i386/mach-default/irq_vectors.h:95:19: missing binary operator before token "("
In file included from interceptor.c:27:
linux_os.h:18:40: missing binary operator before token "("
linux_os.h:23:40: missing binary operator before token "("
linux_os.h:27:41: missing binary operator before token "("
linux_os.h:33:41: missing binary operator before token "("
In file included from interceptor.c:27:
linux_os.h:38: error: conflicting types for `copy_from_user'
/lib/modules/2.6.3-4mdk/build/include/asm/uaccess.h:497: error: previous declaration of `copy_from_user'
In file included from interceptor.c:27:
linux_os.h:49: error: conflicting types for `copy_to_user'
/lib/modules/2.6.3-4mdk/build/include/asm/uaccess.h:472: error: previous declaration of `copy_to_user'
interceptor.c:78:41: missing binary operator before token "("
interceptor.c:87: warning: initialization makes integer from pointer without a cast
interceptor.c:87: error: initializer element is not computable at load time
interceptor.c:87: error: (near initialization for `interceptor_dev.name[0]')
interceptor.c:88: error: initializer element is not constant
interceptor.c:88: error: (near initialization for `interceptor_dev.name')
interceptor.c: In function `handle_vpnup':
interceptor.c:325: error: structure has no member named `next'
interceptor.c:330: error: structure has no member named `next'
In file included from IPSecDrvOS_linux.c:15:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/cpumask.h:4,
from /lib/modules/2.6.3-4mdk/build/include/linux/cpumask.h:6,
from /usr/include/linux/sched.h:14,
from IPSecDrvOS_linux.c:17:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:10:5: missing binary operator before token "("
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:34:5: missing binary operator before token "("
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/smp.h:18,
from /usr/include/linux/smp.h:13,
from /usr/include/linux/sched.h:22,
from IPSecDrvOS_linux.c:17:
/lib/modules/2.6.3-4mdk/build/include/asm/mpspec.h:50: error: variable-size type declared outside of any function
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:7,
from /usr/include/linux/sched.h:24,
from IPSecDrvOS_linux.c:17:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from /usr/include/linux/percpu.h:4,
from /usr/include/linux/sched.h:30,
from IPSecDrvOS_linux.c:17:
/lib/modules/2.6.3-4mdk/build/include/linux/mmzone.h:338: error: parse error before '(' token
In file included from IPSecDrvOS_linux.h:21,
from IPSecDrvOSFunctions.h:24,
from IPSecDrvOS_linux.c:22:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
IPSecDrvOS_linux.c: In function `GetCurrentTime':
IPSecDrvOS_linux.c:63: error: incompatible types in assignment
In file included from frag.c:2:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/cpumask.h:4,
from /lib/modules/2.6.3-4mdk/build/include/linux/cpumask.h:6,
from /usr/include/linux/sched.h:14,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from frag.c:3:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:10:5: missing binary operator before token "("
/lib/modules/2.6.3-4mdk/build/include/asm-generic/cpumask.h:34:5: missing binary operator before token "("
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/smp.h:18,
from /usr/include/linux/smp.h:13,
from /usr/include/linux/sched.h:22,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from frag.c:3:
/lib/modules/2.6.3-4mdk/build/include/asm/mpspec.h:50: error: variable-size type declared outside of any function
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:7,
from /usr/include/linux/sched.h:24,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from frag.c:3:
/lib/modules/2.6.3-4mdk/build/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large
In file included from /lib/modules/2.6.3-4mdk/build/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from /usr/include/linux/percpu.h:4,
from /usr/include/linux/sched.h:30,
from /lib/modules/2.6.3-4mdk/build/include/linux/module.h:10,
from /lib/modules/2.6.3-4mdk/build/include/linux/device.h:21,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:38,
from frag.c:3:
/lib/modules/2.6.3-4mdk/build/include/linux/mmzone.h:338: error: parse error before '(' token
In file included from /lib/modules/2.6.3-4mdk/build/include/asm/irq.h:16,
from /lib/modules/2.6.3-4mdk/build/include/linux/irq.h:20,
from /lib/modules/2.6.3-4mdk/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.3-4mdk/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.3-4mdk/build/include/linux/netdevice.h:501,
from frag.c:3:
/lib/modules/2.6.3-4mdk/build/include/asm-i386/mach-default/irq_vectors.h:95:19: missing binary operator before token "("
In file included from frag.c:14:
linux_os.h:18:40: missing binary operator before token "("
linux_os.h:23:40: missing binary operator before token "("
linux_os.h:27:41: missing binary operator before token "("
linux_os.h:33:41: missing binary operator before token "("
In file included from frag.c:14:
linux_os.h:38: error: conflicting types for `copy_from_user'
/lib/modules/2.6.3-4mdk/build/include/asm/uaccess.h:497: error: previous declaration of `copy_from_user'
In file included from frag.c:14:
linux_os.h:49: error: conflicting types for `copy_to_user'
/lib/modules/2.6.3-4mdk/build/include/asm/uaccess.h:472: error: previous declaration of `copy_to_user'
ld: cannot open frag.o: No such file or directory
Failed to make module "cisco_ipsec".
 
Old 04-23-2004, 04:37 AM   #13
eugeneteo
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Re: Continue of above msg

Hmm, install kernel-source package, and then try again.

Eugene

Quote:
Originally posted by valent_h
"======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
snipped.
 
Old 04-24-2004, 03:14 AM   #14
valent_h
LQ Newbie
 
Registered: Apr 2004
Posts: 18

Rep: Reputation: 0
Oh Yet It works thanks...
Cannot work with only header installed
A word of advice for ALL MUST INSTALL the WHOLE Kernel Source to work
 
Old 04-24-2004, 03:19 AM   #15
eugeneteo
LQ Newbie
 
Registered: Apr 2004
Posts: 9

Rep: Reputation: 0
Quote:
Originally posted by valent_h
Oh Yet It works thanks...
Cannot work with only header installed
A word of advice for ALL MUST INSTALL the WHOLE Kernel Source to work
Of course, of course.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco VPN Client unable to insert kernel module cuco76 Linux - Networking 2 04-14-2005 03:36 PM
enterprise linux ws, cisco vpn client, install kernel source ganewton Linux - Security 3 09-20-2004 12:43 AM
Cisco VPN Client on Debian with kernel 2.6.4 stephanhuiser Linux - Networking 1 06-17-2004 11:34 AM
Connect to Cisco VPN w/o Cisco VPN Client gboutwel Linux - Networking 4 02-07-2003 12:46 PM
cisco vpn client aqoliveira Linux - Networking 4 07-19-2002 08:09 AM


All times are GMT -5. The time now is 12:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration