Browse Source

softethervpn: Really fix iconv support

softethervpn overrides nls.mk by defining its iconv functions. This only
works if the libc has iconv. In addition, it does not allow external
libiconv usage. TARGET_LDFLAGS is also the wrong place to add -liconv.

Removed SSL3 patch. It was needed for OpenSSL 1.0.2 but not anymore.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 5 years ago
parent
commit
fb480e297c
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
3 changed files with 41 additions and 18 deletions
  1. +2
    -5
      net/softethervpn/Makefile
  2. +0
    -13
      net/softethervpn/patches/105-nossl3.patch
  3. +39
    -0
      net/softethervpn/patches/130-iconv.patch

+ 2
- 5
net/softethervpn/Makefile View File

@ -12,7 +12,7 @@ PKG_NAME:=softethervpn
PKG_VERSION:=4.28-9669 PKG_VERSION:=4.28-9669
PKG_VERREL:=beta PKG_VERREL:=beta
PKG_VERDATE:=2018.09.11 PKG_VERDATE:=2018.09.11
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz
PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/ PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/
@ -25,7 +25,7 @@ PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DEPENDS:=softethervpn/host PKG_BUILD_DEPENDS:=softethervpn/host
HOST_BUILD_DEPENDS:=readline/host
HOST_BUILD_DEPENDS:=readline/host libiconv/host
HAMCORE_SE2:=$(STAGING_DIR_HOST)/share/softethervpn/hamcore.se2 HAMCORE_SE2:=$(STAGING_DIR_HOST)/share/softethervpn/hamcore.se2
@ -63,9 +63,6 @@ TARGET_CFLAGS += \
$(if $(CONFIG_OPENSSL_WITH_SSL3),,-DSSL_OP_NO_SSLv3) \ $(if $(CONFIG_OPENSSL_WITH_SSL3),,-DSSL_OP_NO_SSLv3) \
$(if $(filter mips mipsel,$(ARCH)),-minterlink-mips16) $(if $(filter mips mipsel,$(ARCH)),-minterlink-mips16)
TARGET_LDFLAGS += \
-liconv
# Select 32 or 64 bit Makefile for target build depending on 64bit config symbol # Select 32 or 64 bit Makefile for target build depending on 64bit config symbol
MAKE_FLAGS += \ MAKE_FLAGS += \
-f src/makefiles/linux_$(if $(CONFIG_ARCH_64BIT),64,32)bit.mak -f src/makefiles/linux_$(if $(CONFIG_ARCH_64BIT),64,32)bit.mak


+ 0
- 13
net/softethervpn/patches/105-nossl3.patch View File

@ -1,13 +0,0 @@
Index: v4.25-9656/src/Mayaqua/Network.c
===================================================================
--- v4.25-9656.orig/src/Mayaqua/Network.c
+++ v4.25-9656/src/Mayaqua/Network.c
@@ -13025,7 +13025,7 @@ bool StartSSLEx(SOCK *sock, X *x, K *pri
{
if (client_tls == false)
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifndef SSL_OP_NO_SSLv3
SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_method());
#else
SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_method());

+ 39
- 0
net/softethervpn/patches/130-iconv.patch View File

@ -0,0 +1,39 @@
diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h
index 194f8e6..177129e 100644
--- a/src/Mayaqua/Mayaqua.h
+++ b/src/Mayaqua/Mayaqua.h
@@ -292,7 +292,7 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, char *CmdLine, int CmdShow)
#include <ifaddrs.h>
#endif // MAYAQUA_SUPPORTS_GETIFADDRS
-#ifdef UNIX_LINUX
+#if 0
typedef void *iconv_t;
iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
size_t iconv (iconv_t __cd, char **__restrict __inbuf,
diff --git a/src/makefiles/linux_32bit.mak b/src/makefiles/linux_32bit.mak
index 8219d5d..8020290 100644
--- a/src/makefiles/linux_32bit.mak
+++ b/src/makefiles/linux_32bit.mak
@@ -31,7 +31,7 @@ OPTIONS_LINK_DEBUG=-g -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lrea
OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char
-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -liconv -lpthread -lssl -lcrypto -lreadline -lncurses -lz
INSTALL_BINDIR=/usr/bin/
INSTALL_VPNSERVER_DIR=/usr/vpnserver/
diff --git a/src/makefiles/linux_64bit.mak b/src/makefiles/linux_64bit.mak
index 7f81b58..a36e0de 100644
--- a/src/makefiles/linux_64bit.mak
+++ b/src/makefiles/linux_64bit.mak
@@ -31,7 +31,7 @@ OPTIONS_LINK_DEBUG=-g -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto
OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -DCPU_64 -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char
-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz
+OPTIONS_LINK_RELEASE=-O2 -fsigned-char -lm -ldl -lrt -liconv -lpthread -lssl -lcrypto -lreadline -lncurses -lz
INSTALL_BINDIR=/usr/bin/
INSTALL_VPNSERVER_DIR=/usr/vpnserver/

Loading…
Cancel
Save