updated on Wed Jan 25 12:16:47 UTC 2012
[aur-mirror.git] / ciscovpnclient / vpnclient-linux-4.8.02-64bit.ge.2.6.31.patch
blobe47e8a1ca3f3047c37acd4286ca7c32933295d5f
1 diff -uBbr vpnclient.orig/interceptor.c vpnclient/interceptor.c
2 --- vpnclient.orig/interceptor.c 2009-10-07 20:22:56.000000000 +0200
3 +++ vpnclient/interceptor.c 2009-10-07 20:28:48.000000000 +0200
4 @@ -120,6 +120,14 @@
5 .notifier_call = handle_netdev_event,
6 };
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
9 +static const struct net_device_ops vpn_netdev_ops = {
10 + .ndo_start_xmit = interceptor_tx,
11 + .ndo_get_stats = interceptor_stats,
12 + .ndo_do_ioctl = interceptor_ioctl,
13 +};
14 +#endif
16 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
17 static int
18 #else
19 @@ -128,10 +136,13 @@
20 interceptor_init(struct net_device *dev)
22 ether_setup(dev);
24 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
25 + dev->netdev_ops = &vpn_netdev_ops;
26 + #else
27 dev->hard_start_xmit = interceptor_tx;
28 dev->get_stats = interceptor_stats;
29 dev->do_ioctl = interceptor_ioctl;
30 + #endif
32 dev->mtu = ETH_DATA_LEN-MTU_REDUCTION;
33 kernel_memcpy(dev->dev_addr, interceptor_eth_addr,ETH_ALEN);
34 @@ -268,8 +279,13 @@
35 Bindings[i].original_mtu = dev->mtu;
37 /*replace the original send function with our send function */
38 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
39 + Bindings[i].InjectSend = dev->netdev_ops->ndo_start_xmit;
40 + dev->netdev_ops->ndo_start_xmit = replacement_dev_xmit;
41 + #else
42 Bindings[i].InjectSend = dev->hard_start_xmit;
43 dev->hard_start_xmit = replacement_dev_xmit;
44 + #endif
46 /*copy in the ip packet handler function and packet type struct */
47 Bindings[i].InjectReceive = original_ip_handler.orig_handler_func;
48 @@ -291,7 +307,11 @@
49 if (b)
51 rc = 0;
52 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
53 + dev->netdev_ops->ndo_start_xmit = b->InjectSend;
54 + #else
55 dev->hard_start_xmit = b->InjectSend;
56 + #endif
57 kernel_memset(b, 0, sizeof(BINDING));
59 else