summaryrefslogtreecommitdiff
path: root/debian/patches/kfreebsd_support.patch
blob: 0e72c1239108e15a3e21719ee22e2f5fd56bb4f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: Improve kFreeBSD support
Author: Gonéri Le Bouder <goneri@rulezlan.org>
Bug-Debian: http://bugs.debian.org/626062
Index: openvpn/src/openvpn/route.c
===================================================================
--- openvpn.orig/src/openvpn/route.c	2016-05-10 17:46:23.708838589 +0200
+++ openvpn/src/openvpn/route.c	2016-05-10 17:46:23.704838624 +0200
@@ -1421,7 +1421,7 @@
   argv_msg (D_ROUTE, &argv);
   status = openvpn_execve_check (&argv, es, 0, "ERROR: Solaris route add command failed");
 
-#elif defined(TARGET_FREEBSD)
+#elif defined(TARGET_FREEBSD)||defined(__FreeBSD_kernel__)
 
   argv_printf (&argv, "%s add",
 		ROUTE_PATH);
Index: openvpn/src/openvpn/tun.c
===================================================================
--- openvpn.orig/src/openvpn/tun.c	2016-05-10 17:46:23.708838589 +0200
+++ openvpn/src/openvpn/tun.c	2016-05-10 17:46:39.656696603 +0200
@@ -625,7 +625,7 @@
 }
 #endif
 
-#if defined(TARGET_FREEBSD)||defined(TARGET_DRAGONFLY)
+#if defined(TARGET_FREEBSD)||defined(__FreeBSD_kernel__)||defined(TARGET_DRAGONFLY)
 /* we can't use true subnet mode on tun on all platforms, as that
  * conflicts with IPv6 (wants to use ND then, which we don't do),
  * but the OSes want "a remote address that is different from ours"
@@ -1124,7 +1124,7 @@
 	  add_route_connected_v6_net(tt, es);
 	}
 
-#elif defined(TARGET_FREEBSD)||defined(TARGET_DRAGONFLY)
+#elif defined(TARGET_FREEBSD)||defined(TARGET_DRAGONFLY)||defined(__FreeBSD_kernel__)
 
       /* example: ifconfig tun2 10.2.0.2 10.2.0.1 mtu 1450 netmask 255.255.255.255 up */
       if (tun)