Lines 1-53
Link Here
|
1 |
--- tun.c.orig Sun Jun 23 23:43:57 2002 |
|
|
2 |
+++ tun.c Sun Jun 23 23:45:54 2002 |
3 |
@@ -76,7 +76,7 @@ |
4 |
); |
5 |
msg (M_INFO, "%s", command_line); |
6 |
if (openvpn_system (command_line) != 0) |
7 |
- msg (M_ERR, "linux ifconfig failed"); |
8 |
+ msg (M_ERR, "Linux ifconfig failed"); |
9 |
|
10 |
#elif defined(TARGET_SOLARIS) |
11 |
|
12 |
@@ -90,7 +90,7 @@ |
13 |
); |
14 |
msg (M_INFO, "%s", command_line); |
15 |
if (openvpn_system (command_line) != 0) |
16 |
- msg (M_ERR, "solaris ifconfig failed"); |
17 |
+ msg (M_ERR, "Solaris ifconfig failed"); |
18 |
|
19 |
#elif defined(TARGET_OPENBSD) |
20 |
|
21 |
@@ -118,7 +118,7 @@ |
22 |
); |
23 |
msg (M_INFO, "%s", command_line); |
24 |
if (openvpn_system (command_line) != 0) |
25 |
- msg (M_ERR, "openbsd ifconfig failed"); |
26 |
+ msg (M_ERR, "OpenBSD ifconfig failed"); |
27 |
|
28 |
#elif defined(TARGET_DARWIN) |
29 |
|
30 |
@@ -144,7 +144,22 @@ |
31 |
); |
32 |
msg (M_INFO, "%s", command_line); |
33 |
if (openvpn_system (command_line) != 0) |
34 |
- msg (M_ERR, "darwin ifconfig failed"); |
35 |
+ msg (M_ERR, "Darwin ifconfig failed"); |
36 |
+ |
37 |
+#elif defined(TARGET_FREEBSD) |
38 |
+ /* example: ifconfig tun2 10.2.0.2 10.2.0.1 mtu 1450 netmask 255.255.255.255 up */ |
39 |
+ snprintf (command_line, sizeof (command_line), |
40 |
+ IFCONFIG_PATH " %s %s %s mtu %d netmask 255.255.255.255 up", |
41 |
+ dev, |
42 |
+ ifconfig_local, |
43 |
+ ifconfig_remote, |
44 |
+ tun_mtu |
45 |
+ ); |
46 |
+ msg (M_INFO, "%s", command_line); |
47 |
+ if (openvpn_system (command_line) != 0) |
48 |
+ msg (M_ERR, "FreeBSD ifconfig failed"); |
49 |
+ |
50 |
+ |
51 |
|
52 |
#else |
53 |
msg (M_FATAL, "Sorry, but I don't know how to do 'ifconfig' commands on this operating system. You should ifconfig your tun/tap device manually or use an --up script."); |