From 63b58f3f763341e20df9b0d0a5a04de4141da79c Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 25 Sep 2021 07:21:54 +0200 Subject: [PATCH 1/5] Update MLVPN --- .../resources/view/services/mlvpn.js | 6 ++++ mlvpn/Makefile | 6 ++-- mlvpn/files/etc/config/mlvpn | 3 +- mlvpn/files/etc/init.d/mlvpn | 8 +++-- mlvpn/patches/020-remove-cdefs.patch | 33 +++++++++++++++++++ 5 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 mlvpn/patches/020-remove-cdefs.patch diff --git a/luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js b/luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js index e7259c44a..f8bbc58c5 100644 --- a/luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js +++ b/luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js @@ -82,6 +82,12 @@ return L.view.extend({ o.rmempty = false; o.modalonly = true; + o = s.taboption('advanced', form.Value, 'latency_tolerance', _('Latency tolerance')); + o.default = '300'; + o.datatype = "uinteger"; + o.rmempty = false; + o.modalonly = true; + return m.render(); } }); diff --git a/mlvpn/Makefile b/mlvpn/Makefile index f9a356f02..1dbe8573b 100644 --- a/mlvpn/Makefile +++ b/mlvpn/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mlvpn -PKG_VERSION:=2263bab +PKG_VERSION:=8aa1b16 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/zehome/MLVPN.git -PKG_SOURCE_VERSION:=2263bab7e5f983e1daa33887b53120c12646398f -PKG_SOURCE_DATE:=2020-12-16 +PKG_SOURCE_VERSION:=8aa1b16d843ea68734e2520e39a34cb7f3d61b2b +PKG_SOURCE_DATE:=2021-08-14 #PKG_SOURCE_URL:=https://github.com/markfoodyburton/MLVPN.git #PKG_SOURCE_VERSION:=8f9720978b28c1954f9f229525333547283316d2 #PKG_SOURCE_DATE:=2018-09-03 diff --git a/mlvpn/files/etc/config/mlvpn b/mlvpn/files/etc/config/mlvpn index 1122794be..bbd90b5a4 100644 --- a/mlvpn/files/etc/config/mlvpn +++ b/mlvpn/files/etc/config/mlvpn @@ -8,4 +8,5 @@ config mlvpn 'general' option host '128.128.128.128' option firstport '65201' option interface_name 'mlvpn0' - option loss_tolerance '50' \ No newline at end of file + option loss_tolerance '50' + option latency_tolerance '300' diff --git a/mlvpn/files/etc/init.d/mlvpn b/mlvpn/files/etc/init.d/mlvpn index 33f6e75a9..3c11ff633 100755 --- a/mlvpn/files/etc/init.d/mlvpn +++ b/mlvpn/files/etc/init.d/mlvpn @@ -33,14 +33,15 @@ interface_multipath_settings() { } start() { - local enable timeout mode password reorder_buffer_size interface_name host firstport loss_tolerence + local enable timeout mode password reorder_buffer_size interface_name host firstport loss_tolerance latency_tolerance [ "$(uci -q get mlvpn.general.enable)" = "1" ] || return 1 interface_name="$(uci -q get mlvpn.general.interface_name)" timeout="$(uci -q get mlvpn.general.timeout)" mode="$(uci -q get mlvpn.general.mode)" password="$(uci -q get mlvpn.general.password)" reorder_buffer_size="$(uci -q get mlvpn.general.reorder_buffer_size)" - loss_tolerence="$(uci -q get mlvpn.general.loss_tolerence)" + loss_tolerance="$(uci -q get mlvpn.general.loss_tolerance)" + latency_tolerance="$(uci -q get mlvpn.general.latency_tolerance)" cleartext_data="$(uci -q get mlvpn.general.cleartext_data)" [ -z "$cleartext_data" ] && cleartext_data="0" host="$(uci -q get mlvpn.general.host)" @@ -59,7 +60,8 @@ start() { timeout = ${timeout} reorder_buffer = yes reorder_buffer_size = ${reorder_buffer_size} - loss_tolerence = ${loss_tolerence} + loss_tolerence = ${loss_tolerance} + latency_tolerence = ${latency_tolerance} cleartext_data = ${cleartext_data} password = "${password}" mtu = 1452 diff --git a/mlvpn/patches/020-remove-cdefs.patch b/mlvpn/patches/020-remove-cdefs.patch new file mode 100644 index 000000000..9b4bd38a0 --- /dev/null +++ b/mlvpn/patches/020-remove-cdefs.patch @@ -0,0 +1,33 @@ +--- a/src/vis.h.anc 2021-09-24 22:00:03.900321816 +0200 ++++ b/src/vis.h 2021-09-24 22:00:21.500028958 +0200 +@@ -79,7 +79,6 @@ + */ + #define UNVIS_END 1 /* no more characters */ + +-#include + + __BEGIN_DECLS + char *vis(char *, int, int, int); +--- a/src/vis.h.anc 2021-09-24 22:05:19.543069573 +0200 ++++ b/src/vis.h 2021-09-24 22:06:00.430389216 +0200 +@@ -80,7 +80,9 @@ + #define UNVIS_END 1 /* no more characters */ + + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + char *vis(char *, int, int, int); + int strvis(char *, const char *, int); + int stravis(char **, const char *, int); +@@ -93,6 +95,8 @@ + ssize_t strnunvis(char *, const char *, size_t) + __attribute__ ((__bounded__(__string__,1,3))); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* !HAVE_STRNVIS || BROKEN_STRNVIS */ From 32cbaf2c1c0ace19eab0565790b94fec5a50db99 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 25 Sep 2021 08:42:08 +0200 Subject: [PATCH 2/5] Remove not needed mlvpn patch --- mlvpn/patches/010-musl-fix.patch | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 mlvpn/patches/010-musl-fix.patch diff --git a/mlvpn/patches/010-musl-fix.patch b/mlvpn/patches/010-musl-fix.patch deleted file mode 100644 index 851d3dfca..000000000 --- a/mlvpn/patches/010-musl-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/privsep.c -+++ b/src/privsep.c -@@ -778,7 +778,7 @@ sig_got_chld(int sig) - pid_t pid; - - do { -- pid = waitpid(WAIT_ANY, NULL, WNOHANG); -+ pid = waitpid(-1, NULL, WNOHANG); - if (pid == child_pid && cur_state < STATE_QUIT) - cur_state = STATE_QUIT; - } while (pid > 0 || (pid == -1 && errno == EINTR)); From 0460b9dc5b41871b043eb12be4ad6ce68d2a823f Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 25 Sep 2021 08:59:10 +0200 Subject: [PATCH 3/5] Update cryptodev --- cryptodev-linux/Makefile | 58 +++++++++++++++++++ .../010-fix-build-for-kernel-v5.9-rc1.patch | 32 ++++++++++ 2 files changed, 90 insertions(+) create mode 100644 cryptodev-linux/Makefile create mode 100644 cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch diff --git a/cryptodev-linux/Makefile b/cryptodev-linux/Makefile new file mode 100644 index 000000000..0c1f63a60 --- /dev/null +++ b/cryptodev-linux/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=cryptodev-linux +PKG_VERSION:=1.12 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)? +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938 +PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=COPYING + +PKG_MAINTAINER:=Ansuel Smith + +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/cryptodev + SUBMENU:=Cryptographic API modules + TITLE:=Driver for cryptographic acceleration + URL:=http://cryptodev-linux.org/ + VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash + FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,50,cryptodev) + MODPARAMS.cryptodev:=cryptodev_verbosity=-1 +endef + +define KernelPackage/cryptodev/description + This is a driver for that allows to use the Linux kernel supported + hardware ciphers by user-space applications. +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(KERNEL_MAKE_FLAGS) \ + KERNEL_DIR="$(LINUX_DIR)" +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto + $(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/ +endef + +$(eval $(call KernelPackage,cryptodev)) diff --git a/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch b/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch new file mode 100644 index 000000000..09768a1f3 --- /dev/null +++ b/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch @@ -0,0 +1,32 @@ +From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001 +From: Joan Bruguera +Date: Fri, 14 Aug 2020 00:13:38 +0200 +Subject: [PATCH] Fix build for Linux 5.9-rc1 + +See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6 + https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/ + +Signed-off-by: Joan Bruguera +--- + zc.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/zc.c ++++ b/zc.c +@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr, + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL); +-#else ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)) + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL, NULL); ++#else ++ ret = get_user_pages_remote(mm, ++ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, ++ pg, NULL, NULL); + #endif + #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) + up_read(&mm->mmap_sem); From a7e581c4de7ded0c09f39a8c2fbb6db87eb32b68 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 25 Sep 2021 10:36:37 +0200 Subject: [PATCH 4/5] Update tracebox and fix compilation with gcc 11 --- tracebox/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tracebox/Makefile b/tracebox/Makefile index 59778d4bd..9c8117df7 100644 --- a/tracebox/Makefile +++ b/tracebox/Makefile @@ -14,11 +14,13 @@ PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/tracebox/tracebox.git +PKG_SOURCE_URL:=https://github.com/dreibh/tracebox.git +#https://github.com/tracebox/tracebox.git PKG_MAINTAINER:=Ycarus PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=v0.4.4 +PKG_SOURCE_VERSION:=4ad40ea43354038a04ad90aedae5874801c223e8 +#v0.4.4 PKG_FIXUP:=autoreconf @@ -43,7 +45,7 @@ CONFIGURE_VARS += \ CONFIGURE_ARGS += --enable-sniffer --enable-curl --with-libpcap="$(STAGING_DIR)/usr/include/" -EXTRA_CPPFLAGS += -fpermissive -Wno-variadic-macros +EXTRA_CPPFLAGS += -fpermissive -Wno-variadic-macros -std=c++14 TARGET_CFLAGS += -D_GNU_SOURCE From 770583c8c0656ed8348b9a4ab8085d97244ccd60 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 25 Sep 2021 16:45:08 +0200 Subject: [PATCH 5/5] Remove not needed patche --- .../010-fix-build-for-kernel-v5.9-rc1.patch | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch diff --git a/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch b/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch deleted file mode 100644 index 09768a1f3..000000000 --- a/cryptodev-linux/patches/010-fix-build-for-kernel-v5.9-rc1.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001 -From: Joan Bruguera -Date: Fri, 14 Aug 2020 00:13:38 +0200 -Subject: [PATCH] Fix build for Linux 5.9-rc1 - -See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6 - https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/ - -Signed-off-by: Joan Bruguera ---- - zc.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/zc.c -+++ b/zc.c -@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr, - ret = get_user_pages_remote(task, mm, - (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, - pg, NULL); --#else -+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)) - ret = get_user_pages_remote(task, mm, - (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, - pg, NULL, NULL); -+#else -+ ret = get_user_pages_remote(mm, -+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, -+ pg, NULL, NULL); - #endif - #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)) - up_read(&mm->mmap_sem);