1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Revert "fix"

This reverts commit 9916032c7a.
This commit is contained in:
suyuan168 2022-05-20 08:37:04 +08:00
parent 9916032c7a
commit 5f521932b2
185 changed files with 7761 additions and 4020 deletions

View file

@ -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:=ddafba3c0bd63e0d733d3d5a4532e275714991b3
PKG_SOURCE_DATE:=2021-10-28
#PKG_SOURCE_URL:=https://github.com/markfoodyburton/MLVPN.git
#PKG_SOURCE_VERSION:=8f9720978b28c1954f9f229525333547283316d2
#PKG_SOURCE_DATE:=2018-09-03

View file

@ -8,3 +8,5 @@ config mlvpn 'general'
option host '128.128.128.128'
option firstport '65201'
option interface_name 'mlvpn0'
option loss_tolerance '50'
option latency_tolerance '300'

View file

@ -13,7 +13,8 @@ interface_multipath_settings() {
mode="$(uci -q get openmptcprouter.$config.multipath)"
}
[ "$mode" = "off" ] || [ "$mode" = "" ] && return 1
config_get ifname "$config" ifname
config_get ifname "$config" device
[ -z "$ifname" ] && config_get ifname "$config" ifname
[ -z "$ifname" ] && ifname=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
[ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]')
[ -z "$ifname" ] && return 1
@ -32,21 +33,22 @@ 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)"
firstport="$(uci -q get mlvpn.general.firstport)"
if [ "$(uci -q get network.omrvpn)" != "${interface_name}" ]; then
uci -q set network.omrvpn.ifname=${interface_name}
uci -q set network.omrvpn.device=${interface_name}
uci -q commit
fi
@ -58,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

View file

@ -11,7 +11,7 @@ if [ "$(uci -q get network.omrvpn)" = "" ] && [ "$(uci -q get network.mlvpn)" =
uci -q batch <<-EOF >/dev/null
delete network.mlvpn=interface
set network.mlvpn=interface
set network.mlvpn.ifname=mlvpn0
set network.mlvpn.device=mlvpn0
set network.mlvpn.proto=dhcp
set network.mlvpn.ip4table=vpn
set network.mlvpn.multipath=off

View file

@ -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));

View file

@ -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 <sys/cdefs.h>
__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 */