mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
Adding OpenVPN patchset to work with Haiku (#9300)
* Adding OpenVPN Patchset * Update openvpn-2.6.4.patchset * Update openvpn-2.6.4.patchset * Update openvpn-2.6.4.patchset * Update openvpn-2.6.4.patchset * Update openvpn-2.6.4.recipe
This commit is contained in:
@@ -7,10 +7,13 @@ HOMEPAGE="https://openvpn.net"
|
||||
COPYRIGHT="2002-2023 OpenVPN Inc"
|
||||
LICENSE="OpenVPN
|
||||
GNU GPL v2"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/OpenVPN/openvpn/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="bfab07b900262a990fc4519596b29c380ed5a89216593f04719279715ebd04d3"
|
||||
SOURCE_FILENAME="openvpn-$portVersion.tar.gz"
|
||||
PATCHES="
|
||||
openvpn-$portVersion.patchset
|
||||
"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
45
net-vpn/openvpn/patches/openvpn-2.6.4.patchset
Normal file
45
net-vpn/openvpn/patches/openvpn-2.6.4.patchset
Normal file
@@ -0,0 +1,45 @@
|
||||
From c94b287ff24a5b50941ab9e5c00a64f64f809380 Mon Sep 17 00:00:00 2001
|
||||
From: Swangeon <swangeon@gmail.com>
|
||||
Date: Sun, 27 Aug 2023 15:00:18 -0500
|
||||
Subject: [PATCH] Changed configure.ac to recognize Haiku and tun.c to use
|
||||
ifconfig
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 67f680b..26b3e4b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -373,6 +373,10 @@ case "$host" in
|
||||
have_tap_header="yes"
|
||||
ac_cv_header_net_if_h="no" # exists, but breaks things
|
||||
;;
|
||||
+ *-*-haiku*)
|
||||
+ AC_DEFINE([TARGET_HAIKU], [1], [Are we running Haiku?])
|
||||
+ AC_DEFINE_UNQUOTED([TARGET_PREFIX]. ["H"], [Target prefix])
|
||||
+ ;;
|
||||
*)
|
||||
AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["X"], [Target prefix])
|
||||
have_tap_header="yes"
|
||||
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
|
||||
index 2320e8b..2fb0de9 100644
|
||||
--- a/src/openvpn/tun.c
|
||||
+++ b/src/openvpn/tun.c
|
||||
@@ -1578,6 +1578,16 @@ do_ifconfig_ipv4(struct tuntap *tt, const char *ifname, int tun_mtu,
|
||||
{
|
||||
windows_set_mtu(tt->adapter_index, AF_INET, tun_mtu);
|
||||
}
|
||||
+#elif defined (TARGET_HAIKU)
|
||||
+ {
|
||||
+ /* example: ifconfig tap0 inet 1.1.1.1 255.255.255.0 mtu 1450 up */
|
||||
+ // Need to add ifconfig_remote_netmask since right now it is just NULL
|
||||
+ argv_printf(&argv, "%s %s inet %s 255.255.255.0 mtu %d up", IFCONFIG_PATH,
|
||||
+ ifname, ifconfig_local, tun_mtu);
|
||||
+
|
||||
+ argv_msg(M_INFO, &argv);
|
||||
+ openvpn_execve_check(&argv, es, S_FATAL, "HAIKU ifconfig failed");
|
||||
+ }
|
||||
#else /* if defined(TARGET_LINUX) */
|
||||
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.");
|
||||
#endif /* if defined(TARGET_LINUX) */
|
||||
--
|
||||
2.42.0.windows.1
|
||||
Reference in New Issue
Block a user