aboutsummaryrefslogtreecommitdiffstats
path: root/security/openvpn/files
diff options
context:
space:
mode:
authorpat <pat@FreeBSD.org>2002-06-25 00:13:10 +0800
committerpat <pat@FreeBSD.org>2002-06-25 00:13:10 +0800
commit7f3f5a39db818d531d10cc76f80d8c842fe16b3f (patch)
treef0ee84be57c6d94eb716a1cc5399f2fb48f00715 /security/openvpn/files
parentaf41e90ee4c15a32136d0a200a62322f58bc1664 (diff)
downloadfreebsd-ports-gnome-7f3f5a39db818d531d10cc76f80d8c842fe16b3f.tar.gz
freebsd-ports-gnome-7f3f5a39db818d531d10cc76f80d8c842fe16b3f.tar.zst
freebsd-ports-gnome-7f3f5a39db818d531d10cc76f80d8c842fe16b3f.zip
Add new port openvpn: Secure IP/Ethernet tunnel daemon
PR: ports/39750 Submitted by: Matthias Andree <matthias.andree@web.de>
Diffstat (limited to 'security/openvpn/files')
-rw-r--r--security/openvpn/files/patch-error.c11
-rw-r--r--security/openvpn/files/patch-tun.c53
2 files changed, 64 insertions, 0 deletions
diff --git a/security/openvpn/files/patch-error.c b/security/openvpn/files/patch-error.c
new file mode 100644
index 000000000000..8193100c0e6b
--- /dev/null
+++ b/security/openvpn/files/patch-error.c
@@ -0,0 +1,11 @@
+--- error.c.orig Mon Jun 24 02:27:37 2002
++++ error.c Mon Jun 24 02:28:05 2002
+@@ -215,7 +215,7 @@
+ #if defined(HAVE_OPENLOG) && defined(HAVE_SYSLOG)
+ if (daemon (cd != NULL, 0) < 0)
+ msg (M_ERR, "daemon() failed");
+- openlog ("openvpn", LOG_PID, 0);
++ openlog ("openvpn", LOG_PID, LOG_DAEMON);
+ #else
+ msg (M_WARN, "Warning: this operating system lacks daemon logging features, therefore when I become a daemon, I won't be able to log status or error messages");
+ if (daemon (cd != NULL, 0) < 0)
diff --git a/security/openvpn/files/patch-tun.c b/security/openvpn/files/patch-tun.c
new file mode 100644
index 000000000000..cfba05b75e24
--- /dev/null
+++ b/security/openvpn/files/patch-tun.c
@@ -0,0 +1,53 @@
+--- tun.c.orig Sun Jun 23 23:43:57 2002
++++ tun.c Sun Jun 23 23:45:54 2002
+@@ -76,7 +76,7 @@
+ );
+ msg (M_INFO, "%s", command_line);
+ if (openvpn_system (command_line) != 0)
+- msg (M_ERR, "linux ifconfig failed");
++ msg (M_ERR, "Linux ifconfig failed");
+
+ #elif defined(TARGET_SOLARIS)
+
+@@ -90,7 +90,7 @@
+ );
+ msg (M_INFO, "%s", command_line);
+ if (openvpn_system (command_line) != 0)
+- msg (M_ERR, "solaris ifconfig failed");
++ msg (M_ERR, "Solaris ifconfig failed");
+
+ #elif defined(TARGET_OPENBSD)
+
+@@ -118,7 +118,7 @@
+ );
+ msg (M_INFO, "%s", command_line);
+ if (openvpn_system (command_line) != 0)
+- msg (M_ERR, "openbsd ifconfig failed");
++ msg (M_ERR, "OpenBSD ifconfig failed");
+
+ #elif defined(TARGET_DARWIN)
+
+@@ -144,7 +144,22 @@
+ );
+ msg (M_INFO, "%s", command_line);
+ if (openvpn_system (command_line) != 0)
+- msg (M_ERR, "darwin ifconfig failed");
++ msg (M_ERR, "Darwin ifconfig failed");
++
++#elif defined(TARGET_FREEBSD)
++ /* example: ifconfig tun2 10.2.0.2 10.2.0.1 mtu 1450 netmask 255.255.255.255 up */
++ snprintf (command_line, sizeof (command_line),
++ IFCONFIG_PATH " %s %s %s mtu %d netmask 255.255.255.255 up",
++ dev,
++ ifconfig_local,
++ ifconfig_remote,
++ tun_mtu
++ );
++ msg (M_INFO, "%s", command_line);
++ if (openvpn_system (command_line) != 0)
++ msg (M_ERR, "FreeBSD ifconfig failed");
++
++
+
+ #else
+ 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.");