From f3f2fdfbb822c7f6f5379d70fb8a71e28714c1c1 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 30 Mar 2021 17:32:08 +0200 Subject: [PATCH 1/7] Add bpi-r1 compilation --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fbd63a7c..1f4b860de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ jobs: build: strategy: matrix: - OMR_TARGET: [bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx] + OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx] runs-on: ubuntu-latest continue-on-error: true From f153f1f26ec86dfae8c03ad9179cd6404eb88eb4 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 31 Mar 2021 09:56:34 +0200 Subject: [PATCH 2/7] In status page, put interface in warning instead of error if false firewall zone --- .../luasrc/view/openmptcprouter/wanstatus.htm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm index 18d8dce7e..d7069e493 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm @@ -570,6 +570,11 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm { statusMessage += '<%:No Server http response after 1 second%>' + '
'; } + if(zonewan == "NO") + { + statusMessage += '<%:Network interface not in WAN firewall zone%>' + '
'; + statusMessageClass = "warning"; + } if (istatus == 'ERROR' && ipaddr != '' && ipaddr == mArray.wans[i].gateway) { statusMessage += '<%:Wan IP and gateway are identical%>' + '
'; @@ -614,11 +619,6 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm statusMessage += '<%:Network interface MAC address duplicated%>' + '
'; statusMessageClass = "error"; } - if(zonewan == "NO") - { - statusMessage += '<%:Network interface not in WAN firewall zone%>' + '
'; - statusMessageClass = "error"; - } if(ipv6_discover == 'DETECTED') { statusMessage += '<%:IPv6 route received%>' + '
' From 6ee04579cc79bed31cc2fe7c868ff472f0627837 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 31 Mar 2021 09:56:51 +0200 Subject: [PATCH 3/7] initialize i --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/luci-app-omr-bypass/root/etc/init.d/omr-bypass b/luci-app-omr-bypass/root/etc/init.d/omr-bypass index 433151599..e2b669ff9 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -49,6 +49,7 @@ _bypass_domains() { domain="$(echo '"$domain"' | sed 's:*::')" domainlist="" # construct list of domains to query + i=0 for tld in $tlds; do i=$((i+1)) # trim off header @@ -371,6 +372,7 @@ _bypass_proto() { if [ "$(echo $domain | grep '\.$')" != "" ]; then domainlist="" # construct list of domains to query + i=0 for tld in $tlds; do i=$((i+1)) # trim off header From 7f318ebce488dc398094708d941b5e0fa86eed98 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 31 Mar 2021 09:57:44 +0200 Subject: [PATCH 4/7] no zone error for mptcp over vpn interfaces --- luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter index 670f89c8b..f8a97321f 100755 --- a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter +++ b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter @@ -1390,7 +1390,7 @@ function interfaces_status() end local zonewan = "NO" - if ut.trim(sys.exec("uci -q get firewall.zone_wan.network | grep '" .. interface .. "'")) ~= "" then + if ut.trim(sys.exec("uci -q get firewall.zone_wan.network | grep '" .. interface .. "'")) ~= "" or interface:match("^wg.*") or interface:match("^ovpn.*") then zonewan = "OK" end From a905c24760993a49a2a5e824ddec4193fea22f2b Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 31 Mar 2021 09:58:11 +0200 Subject: [PATCH 5/7] Initialize var and use them --- mptcp/files/usr/share/omr/post-tracking.d/post-tracking | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index 1314ef6a5..f8620c79a 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -876,7 +876,9 @@ if [ "$multipath_config" = "master" ]; then routesbalancing="" routesbalancingbackup="" nbintf=0 + nbintfb=0 nbintf6=0 + nbintfb6=0 config_load network config_foreach set_route_balancing interface config_foreach set_route_balancing6 interface @@ -893,13 +895,13 @@ if [ "$multipath_config" = "master" ]; then } } [ -n "$routesbalancingbackup" ] && { - ([ "$nbintf" -gt "1" ] && [ "$(ip r show default metric 999 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancingbackup " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 999 | grep $OMR_TRACKER_DEVICE)" = "" ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { + ([ "$nbintfb" -gt "1" ] && [ "$(ip r show default metric 999 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancingbackup " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 999 | grep $OMR_TRACKER_DEVICE)" = "" ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { _log "Set backup ip route replace default scope global $routesbalancingbackup" ip route replace default scope global metric 999 $routesbalancingbackup 2>&1 >/dev/null } } [ -n "$routesbalancingbackup6" ] && { - ([ "$nbintf6" -gt "1" ] && [ "$(ip -6 r show default metric 999 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancingbackup6 " ]) || ([ "$nbintf6" = "1" ] && [ "$(ip -6 r show default metric 999 | grep $OMR_TRACKER_DEVICE)" = "" ] && [ -n "$OMR_TRACKER_DEVICE_IP6" ]) && { + ([ "$nbintfb6" -gt "1" ] && [ "$(ip -6 r show default metric 999 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancingbackup6 " ]) || ([ "$nbintf6" = "1" ] && [ "$(ip -6 r show default metric 999 | grep $OMR_TRACKER_DEVICE)" = "" ] && [ -n "$OMR_TRACKER_DEVICE_IP6" ]) && { _log "Set backup ip -6 route replace default scope global $routesbalancingbackup6" ip -6 route replace default scope global metric 999 $routesbalancingbackup6 2>&1 >/dev/null } From 69d0f9f623d233623841ef0411bd556baa863f90 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 31 Mar 2021 10:09:17 +0200 Subject: [PATCH 6/7] Fix r8125 dependencie --- openmptcprouter-full/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index 0219a0963..eab020f97 100644 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) +# Copyright (C) 2018-2021 Ycarus (Yannick Chabanois) # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openmptcprouter-full -PKG_VERSION:=0.13 +PKG_VERSION:=0.14 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk @@ -82,7 +82,7 @@ MY_DEPENDS := \ luci-app-mlvpn mlvpn 464xlat !TARGET_mvebu:kmod-usb-net-smsc75xx kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang (TARGET_x86_64||aarch64):kmod-tcp-bbr2 iptables-mod-ipopt igmpproxy ss iptraf-ng \ luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-wolfssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf \ hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding luci-app-sysupgrade \ - luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard (TARGET_x86||TARGET_x86_64):r8125 + luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard (TARGET_x86||TARGET_x86_64):kmod-r8125 # luci-theme-bootstrap luci-theme-openwrt-2020 luci-theme-openwrt luci-app-status # luci-proto-bonding luci-app-statistics luci-proto-gre # softethervpn5-client softethervpn5-server luci-app-nginx-ha From eb508f2eca3848723cbe805f32f72ec5974e800a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 31 Mar 2021 11:34:20 +0200 Subject: [PATCH 7/7] Fix when multiples IP was used and not anymore --- luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index c8eb36ee8..d73298bea 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -546,6 +546,7 @@ function wizard_add() if sectionname:match("^sss.*") then ucic:delete("shadowsocks-libev",sectionname,"ip") ucic:set("shadowsocks-libev",sectionname,"disabled","1") + ucic:delete("openmptcprouter","omr","ss_" .. sectionname) end end)