You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
14 years ago
|
diff -Naur vpnclient.orig/GenDefs.h vpnclient/GenDefs.h
|
||
|
--- vpnclient.orig/GenDefs.h 2007-08-22 21:30:31.000000000 +0200
|
||
|
+++ vpnclient/GenDefs.h 2008-01-27 17:11:00.000000000 +0100
|
||
|
@@ -105,6 +105,7 @@
|
||
|
#define _INTPTR_T_DEFINED
|
||
|
#endif
|
||
|
|
||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
|
||
|
#ifndef _UINTPTR_T_DEFINED
|
||
|
#if defined(_LP64)
|
||
|
#warning 64 bit
|
||
|
@@ -114,6 +115,7 @@
|
||
|
#endif
|
||
|
#define _UINTPTR_T_DEFINED
|
||
|
#endif
|
||
|
+#endif
|
||
|
|
||
|
|
||
|
typedef int BOOL;
|
||
|
diff -Naur vpnclient.orig/interceptor.c vpnclient/interceptor.c
|
||
|
--- vpnclient.orig/interceptor.c 2007-08-22 21:30:31.000000000 +0200
|
||
|
+++ vpnclient/interceptor.c 2008-01-27 17:11:13.000000000 +0100
|
||
|
@@ -27,6 +27,9 @@
|
||
|
#include <linux/ip.h>
|
||
|
#include <linux/udp.h>
|
||
|
#include <net/protocol.h>
|
||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
|
||
|
+#include <net/net_namespace.h>
|
||
|
+#endif
|
||
|
|
||
|
#include "linux_os.h"
|
||
|
|
||
|
@@ -362,7 +365,9 @@
|
||
|
|
||
|
dp = NULL;
|
||
|
num_target_devices = 0;
|
||
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
|
||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
|
||
|
+ for_each_netdev(&init_net, dp)
|
||
|
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
|
||
|
for_each_netdev(dp)
|
||
|
#else
|
||
|
for (dp = dev_base; dp != NULL; dp = dp->next)
|
||
|
@@ -924,6 +929,9 @@
|
||
|
|
||
|
CNICallbackTable = *PCNICallbackTable;
|
||
|
CniPluginDeviceCreated();
|
||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
|
||
|
+ interceptor_dev.nd_net = &init_net;
|
||
|
+#endif
|
||
|
if ((status = register_netdev(&interceptor_dev)) != 0)
|
||
|
{
|
||
|
printk(KERN_INFO "%s: error %d registering device \"%s\".\n",
|