From 276acb2db61ece680392be762fc76bab9e74655c Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 7 Jul 2021 12:14:50 +0200 Subject: [PATCH 01/91] Keep mac for vlan --- mptcp/files/etc/init.d/mptcp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index 334cc0632..604c54fe8 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -47,7 +47,7 @@ interface_macaddr_count() { local intf="$1" local dmacaddr="$2" config_get macaddr "$intf" macaddr - [ "$macaddr" = "$dmacaddr" ] && nbmac=$((nbmac+1)) + [ "$macaddr" = "$dmacaddr" ] && [ -z "$(echo $intf | grep '\.')" ] && nbmac=$((nbmac+1)) } interface_max_metric() { From 8aa3927d7c2e95d67bb9f6e7cbc4b86737bfa642 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 7 Jul 2021 12:15:16 +0200 Subject: [PATCH 02/91] doesn't add mac for vlan --- macvlan/files/etc/init.d/macvlan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macvlan/files/etc/init.d/macvlan b/macvlan/files/etc/init.d/macvlan index b38597eff..a09988504 100755 --- a/macvlan/files/etc/init.d/macvlan +++ b/macvlan/files/etc/init.d/macvlan @@ -25,7 +25,7 @@ _save_macaddr() { } [ -z "$(uci -q get network.$1.macaddr)" ] && { _ifname=$(uci -q get "network.$1.ifname") - [ -n "$_ifname" ] && { + [ -n "$_ifname" ] && [ -z "$(echo $_ifname | grep '\.')" ] && { _macaddr=$(ip link show dev $_ifname 2>/dev/null | grep link | awk '{print $2}') [ -n "$_macaddr" ] && { uci -q set network.$1.macaddr=$_macaddr From ae8371b2cc7c0fa8e0dcacba1a66e3677be4e1a9 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 9 Jul 2021 18:40:16 +0200 Subject: [PATCH 03/91] Always use device in priority --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 4 ++-- luci-app-openmptcprouter/root/etc/init.d/openmptcprouter | 8 ++++---- .../root/usr/libexec/rpcd/openmptcprouter | 2 +- mptcp/files/etc/init.d/mptcp | 7 ++++--- omr-tracker/files/etc/init.d/omr-tracker | 3 +++ 5 files changed, 14 insertions(+), 10 deletions(-) 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 2b8f56972..c69c1ce62 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -501,8 +501,8 @@ _intf_rule_v2ray_rules() { _intf_rule() { local intf - config_get intf $1 ifname - [ -z "$intf" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + intf=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + [ -z "$intf" ] && config_get intf $1 ifname [ -n "$(echo $intf | grep '@')" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') #count=$((count+1)) config_get count $1 metric diff --git a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter index 9c547bff8..8a1a5ab3c 100755 --- a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter +++ b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter @@ -18,11 +18,11 @@ omr_intf_check() { omr_intf_set() { local device local ifname - config_get ifname "$1" ifname config_get device "$1" device config_get type "$1" type - [ -z "$ifname" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + [ -z "$ifname" ] && config_get ifname "$1" ifname if [ "$type" != "macvlan" ] && [ -n "$ifname" ] && [ -f /sys/class/net/${ifname}/device/uevent ]; then devicepath=$(readlink -f /sys/class/net/${ifname}) @@ -56,7 +56,6 @@ omr_set_settings() { local ifname local multipath config_get multipath "$1" multipath - config_get ifname "$1" ifname config_get device "$1" device config_get proto "$1" proto config_get type "$1" type @@ -76,7 +75,8 @@ omr_set_settings() { [ -z "$addlatency" ] && addlatency=0 devicename=$(echo "$device" | cut -d'/' -f3) - [ -z "$ifname" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + [ -z "$ifname" ] && config_get ifname "$1" ifname [ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') if [ -n "$ifname" ]; then diff --git a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter index effce068c..00b151e38 100755 --- a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter +++ b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter @@ -1156,7 +1156,7 @@ function interfaces_status() end duplicatemac = false - if mac ~= "" and mac ~= nil and not (section["ifname"] ~= nil and section["ifname"]:match("^@.*")) then + if mac ~= "" and mac ~= nil and not (section["ifname"] ~= nil and section["ifname"]:match("^@.*")) and not (ifname ~= nil and ifname:match("%.")) then if allmac[mac] then connectivity = "ERROR" duplicatemac = true diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index 604c54fe8..a4d83ea99 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -85,9 +85,9 @@ interface_multipath_settings() { local enabled config_get enabled "$config" auto "1" - config_get iface "$config" ifname + iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') + [ -z "$iface" ] && config_get iface "$config" ifname config_get txqueuelen "$config" txqueuelen - [ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') [ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["device"]') if [ "$(uci -q get openmptcprouter.${config}.metric)" = "" ]; then count=$((count+1)) @@ -349,7 +349,8 @@ interface_multipath_settings() { } load_interfaces() { - config_get ifname "$1" ifname + ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + [ -z "$ifname" ] && config_get ifname "$1" ifname config_get multipath "$1" multipath "" [ -z "$multipath" ] && multipath="$(uci -q get openmptcprouter.$1.multipath)" [ "$multipath" != "off" ] && [ "$multipath" != "" ] && interfaces=" ${ifname} ${interfaces}" diff --git a/omr-tracker/files/etc/init.d/omr-tracker b/omr-tracker/files/etc/init.d/omr-tracker index 3276316e9..dc9fb4cb7 100755 --- a/omr-tracker/files/etc/init.d/omr-tracker +++ b/omr-tracker/files/etc/init.d/omr-tracker @@ -69,6 +69,9 @@ _launch_tracker() { [ "${ifenabled}" = "0" ] && return [ "${enabled}" = "0" ] && return [ -z "${hosts}" ] && [ "$type" != "none" ] && return + ifstatus=$(ifstatus "$1" | jsonfilter -q -e '@["up"]') + ifdevice=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') + [ "${ifstatus}" = "false" ] && [ -z "${ifdevice}" ] && return [ -z "${interval_tries}" ] && interval_tries=1 procd_open_instance From bc498724ff749639d87a9c79c669c10770f2ffcd Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 10 Jul 2021 15:38:16 +0200 Subject: [PATCH 04/91] Fix get device --- mptcp/files/etc/init.d/mptcp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index a4d83ea99..bb5297dc7 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -85,7 +85,9 @@ interface_multipath_settings() { local enabled config_get enabled "$config" auto "1" - iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') + network_get_device iface $config + [ -z "$iface" ] && network_get_physdev iface $config + [ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') [ -z "$iface" ] && config_get iface "$config" ifname config_get txqueuelen "$config" txqueuelen [ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["device"]') @@ -176,7 +178,7 @@ interface_multipath_settings() { config_get gateway $config gateway config_get netmask $config netmask [ -n "$ipaddr" ] && [ -n "$netmask" ] && netmask=`ipcalc.sh $ipaddr $netmask | sed -n '/PREFIX=/{;s/.*=//;s/ .*//;p;}'` - [ -n "$îpaddr" ] && [ -n "$netmask" ] && network=`ipcalc.sh $ipaddr $netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` + [ -n "$ipaddr" ] && [ -n "$netmask" ] && network=`ipcalc.sh $ipaddr $netmask | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` elif [ "$proto" != "gre" ]; then network_get_ipaddr ipaddr $config [ -z "$ipaddr" ] && ipaddr=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n") From f557cb00804fbb4fef3f3086b689c0f10cf2084e Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 25 Jun 2021 19:43:45 +0200 Subject: [PATCH 05/91] Fix dashboard error --- .../luci-static/resources/view/dashboard/include/10_router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js b/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js index b5892cff2..ad9278c53 100644 --- a/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js +++ b/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js @@ -371,7 +371,7 @@ return baseclass.extend({ release: { title: _('Firmware Version'), - value: boardinfo.release.description ? boardinfo.release.description : null + value: (typeof boardinfo.release.description !== "undefined") ? boardinfo.release.description : null } }; From fb32c87a746e12de6ec9a1126722479ba81f3267 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 2 Feb 2022 19:57:59 +0100 Subject: [PATCH 06/91] Fix ipv6 error --- mptcp/files/etc/init.d/mptcp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index 312a1839f..1ccb1f314 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -291,8 +291,10 @@ interface_multipath_settings() { network6=`ipcalc $ip6addr | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` fi if [ -z "$ip6addr" ] || [ -z "$network6" ]; then - ip6addr=$(ip -6 addr show dev $iface | grep -v 'scope link' | grep inet6 | awk '{print $2}' | cut -d/ -f1 | tr -d "\n") - gateway6=$(ip -6 r list dev $iface | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n") + [ -z "$ip6addr" ] && network_get_ipaddr6 ip6addr $config + [ -z "$ip6addr" ] && ip6addr=$(ip -6 addr show dev $iface | grep -v 'scope link' | grep inet6 | awk '{print $2}' | cut -d/ -f1 | tr -d "\n") + [ -z "$gateway6" ] && network_get_gateway6 gateway6 $config true + [ -z "$gateway6" ] && gateway6=$(ip -6 r list dev $iface | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n") [ -z "$gateway6" ] && gateway6=$(uci -q get "network.$config.ip6gw") [ -z "$gateway6" ] && gateway6=$(ubus call network.interface.$config status | jsonfilter -q -l 1 -e '@.inactive.route[@.target="::"].nexthop' | tr -d "\n") if [ -z "$gateway6" ] || [ "$( valid_subnet6 $gateway6 )" != "ok" ]; then @@ -302,7 +304,7 @@ interface_multipath_settings() { gateway6=$(ubus call network.interface.${config}_6 status 2>/dev/null | jsonfilter -q -l 1 -e '@.inactive.route[@.target="::"].nexthop' | tr -d "\n") fi netmask6=$(ip -6 addr show dev $iface | grep -v 'scope link' | grep inet6 | awk '{print $2}' | cut -d/ -f2 | tr -d "\n") - network6=`ipcalc $ip6addr | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` + [ -n "$ip6addr" ] && network6=`ipcalc $ip6addr | sed -n '/NETWORK=/{;s/.*=//;s/ .*//;p;}'` fi if [ "$(uci -q get openmptcprouter.settings.uci_route)" = "1" ]; then uci -q batch <<-EOF >/dev/null From a12f74df7f13717f22bdbe9239dc81ad2b243a54 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 2 Feb 2022 20:24:00 +0100 Subject: [PATCH 07/91] Fix MPTCP for 5.15 --- mptcp/files/etc/init.d/mptcp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index 1ccb1f314..0516f773e 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -44,7 +44,7 @@ global_multipath_settings() { [ -z "$mptcp_ndiffports_num_subflows" ] || sysctl -qew /sys/module/mptcp_ndiffports/parameters/num_subflows="$mptcp_ndiffports_num_subflows" [ -z "$mptcp_rr_cwnd_limited" ] || sysctl -qew /sys/module/mptcp_rr/parameters/cwnd_limited="$mptcp_rr_cwnd_limited" [ -z "$mptcp_rr_num_segments" ] || sysctl -qew /sys/module/mptcp_rr/parameters/num_segments="$mptcp_rr_num_segments" - else + elif [ -f /proc/sys/net/mptcp/enabled ]; then sysctl -qew net.mptcp.enabled="$multipath_status" ip mptcp limits set add_addr_accepted $mptcp_add_addr_accepted subflows $mptcp_subflows 2>&1 >/dev/null [ -z "$mptcp_add_addr_timeout" ] || sysctl -qew net.mptcp.add_addr_timeout="$mptcp_add_addr_timeout" From 5a64d743d1c4c15e30e2bf46f03def4dcf70e604 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 2 Feb 2022 20:31:31 +0100 Subject: [PATCH 08/91] Fix DNS config --- openmptcprouter/files/etc/uci-defaults/1940-omr-dns | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmptcprouter/files/etc/uci-defaults/1940-omr-dns b/openmptcprouter/files/etc/uci-defaults/1940-omr-dns index 2d4e3cbd9..ecb75b2f5 100755 --- a/openmptcprouter/files/etc/uci-defaults/1940-omr-dns +++ b/openmptcprouter/files/etc/uci-defaults/1940-omr-dns @@ -42,7 +42,7 @@ if [ "$(uci -q get dhcp.lan.dhcp_options)" = "" ]; then EOF fi -if [ -n "$(uci -q dhcp.@dnsmasq[0].server | grep 127.0.0.1)" ] && [ -z "$(uci -q dhcp.@dnsmasq[0].server | grep 127.0.0.1#5353)" ]; then +if [ -n "$(uci -q get dhcp.@dnsmasq[0].server | grep 127.0.0.1)" ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep 127.0.0.1#5353)" ]; then /etc/init.d/https-dns-proxy start /etc/init.d/https-dns-proxy enable else @@ -59,7 +59,7 @@ fi # commit unbound #EOF -if [ -z "$(uci -q unbound.auth_icann)" ]; then +if [ -z "$(uci -q show unbound.auth_icann)" ]; then uci -q batch <<-EOF >/dev/null set unbound.auth_icann=zone set unbound.auth_icann.fallback='1' From 4c0649109d7515755837897ad9d97fa4643c9277 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 2 Feb 2022 21:27:45 +0100 Subject: [PATCH 09/91] Fix MPTCP display --- luci-app-mptcp/luasrc/controller/mptcp.lua | 12 +----------- mptcp/files/usr/bin/multipath | 10 ++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/luci-app-mptcp/luasrc/controller/mptcp.lua b/luci-app-mptcp/luasrc/controller/mptcp.lua index c81458f80..842adc6ef 100644 --- a/luci-app-mptcp/luasrc/controller/mptcp.lua +++ b/luci-app-mptcp/luasrc/controller/mptcp.lua @@ -209,7 +209,7 @@ end function mptcp_monitor_data() luci.http.prepare_content("text/plain") local fullmesh - fullmesh = io.popen("cat /proc/net/mptcp_net/snmp") + fullmesh = io.popen("multipath -m") if fullmesh:read() ~= nil then while true do local ln = fullmesh:read("*l") @@ -217,16 +217,6 @@ function mptcp_monitor_data() luci.http.write(ln) luci.http.write("\n") end - else - fullmesh = io.popen("nstat -z") - if fullmesh then - while true do - local ln = fullmesh:read("*l") - if not ln then break end - luci.http.write(ln) - luci.http.write("\n") - end - end end return end diff --git a/mptcp/files/usr/bin/multipath b/mptcp/files/usr/bin/multipath index 62e029da5..42bb1ddff 100755 --- a/mptcp/files/usr/bin/multipath +++ b/mptcp/files/usr/bin/multipath @@ -29,6 +29,7 @@ case $1 in echo "show established conections: -c" echo "show fullmesh info: -f" echo "show kernel config: -k" + echo "show MPTCP info: -m" echo echo "Flag on the device, to enable/disable MPTCP for this interface. The backup-flag" echo "will allow a subflow to be established across this interface, but only be used" @@ -75,6 +76,13 @@ case $1 in fi echo exit 0 ;; + "-m") + if [ -f /proc/net/mptcp_net/snmp ]; then + cat /proc/net/mptcp_net/snmp + else + nstat -z | grep -i mptcp + fi + exit 0 ;; "") for ifpath in /sys/class/net/*; do $0 ${ifpath##*/} @@ -126,6 +134,8 @@ else ID=$(ip mptcp endpoint show | grep "dev $DEVICE" | awk '{print $3}') IFF=$(ip mptcp endpoint show | grep "dev $DEVICE" | awk '{print $4}') IP=$(ifconfig $DEVICE | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p') + RMID=$(ip mptcp endpoint show | grep '::ffff' | awk '{ print $3 }') + [ -n "$RMID" ] && ip mptcp endpoint delete id $RMID 2>&1 >/dev/null case $TYPE in "off") [ -n "$ID" ] && ip mptcp endpoint delete id $ID 2>&1 >/dev/null From 779ad66f3c958d46b32588310fda23bbb04538fb Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 3 Feb 2022 19:54:39 +0100 Subject: [PATCH 10/91] Add missing var --- mptcp/files/etc/init.d/mptcp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index 0516f773e..d7646364d 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -10,7 +10,7 @@ USE_PROCD=1 . /lib/functions/network.sh global_multipath_settings() { - local multipath mptcp_path_manager mptcp_schdeduler mptcp_debug congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows mptcp_rr_cwnd_limited mptcp_rr_num_segments + local multipath mptcp_path_manager mptcp_scheduler mptcp_subflows mptcp_debug mptcp_add_addr_accepted congestion mptcp_checksum mptcp_syn_retries mptcp_fullmesh_num_subflows mptcp_fullmesh_create_on_err mptcp_ndiffports_num_subflows mptcp_rr_cwnd_limited mptcp_rr_num_segments local multipath_status=0 config_load network config_get multipath globals multipath From 2597f7783b5464a6724d6ecde1c6930c5eff1c5c Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 3 Feb 2022 19:55:31 +0100 Subject: [PATCH 11/91] Remove new line for ping --- openmptcprouter/files/bin/omr-test-speed | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmptcprouter/files/bin/omr-test-speed b/openmptcprouter/files/bin/omr-test-speed index 15666e1e9..618da96fe 100755 --- a/openmptcprouter/files/bin/omr-test-speed +++ b/openmptcprouter/files/bin/omr-test-speed @@ -20,9 +20,9 @@ if [ "$HETZNER" = false ]; then for pinghost in $HOSTLST; do domain=$(echo $pinghost | awk -F/ '{print $3}') if [ -z "$INTERFACE" ]; then - ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1) + ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') else - ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1) + ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') fi echo "host: $domain - ping: $ping" if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then From 58fcea225faec0849f486e9912df2a23090346b3 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 4 Feb 2022 20:44:41 +0100 Subject: [PATCH 12/91] More anonymous config --- luci-app-openmptcprouter/root/bin/anonymous_config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/luci-app-openmptcprouter/root/bin/anonymous_config.sh b/luci-app-openmptcprouter/root/bin/anonymous_config.sh index 674d01726..65c0813a2 100755 --- a/luci-app-openmptcprouter/root/bin/anonymous_config.sh +++ b/luci-app-openmptcprouter/root/bin/anonymous_config.sh @@ -21,5 +21,6 @@ uci show | \ -e "/vpn\.key=/s/......$/xxxxxx'/" \ -e "/vps\.key=/s/......$/xxxxxx'/" \ -e "/wgkey=/s/......$/xxxxxx'/" \ + -e "/key=/s/......$/xxxxxx'/" \ -e "/ula_prefix=2/s/=.........../='xxxxxxxxxxx/" \ -e "/token=/s/............$/xxxxxx'/" \ No newline at end of file From e0ec6cbd3d8cd6df29d8fd10ce14fd7378f22e89 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 4 Feb 2022 20:45:15 +0100 Subject: [PATCH 13/91] More server for speed test --- openmptcprouter/files/bin/omr-test-speed | 40 ++++++++++------------ openmptcprouter/files/bin/omr-test-speedv6 | 39 ++++++++++----------- 2 files changed, 38 insertions(+), 41 deletions(-) diff --git a/openmptcprouter/files/bin/omr-test-speed b/openmptcprouter/files/bin/omr-test-speed index 618da96fe..71bc4d75c 100755 --- a/openmptcprouter/files/bin/omr-test-speed +++ b/openmptcprouter/files/bin/omr-test-speed @@ -1,9 +1,9 @@ #!/bin/sh # vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 : -HETZNER=false -if [ "$1" = "hetzner" ]; then - HETZNER=true +FORCEVPS=false +if [ "$1" = "forcevps" ]; then INTERFACE="$2" + FORCEVPS=true else INTERFACE="$1" fi @@ -13,24 +13,22 @@ fi exit 0 } -if [ "$HETZNER" = false ]; then - echo "Select best test server..." - HOSTLST="http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 http://speedtest.tele2.net/1000GB.zip https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" - bestping="9999" - for pinghost in $HOSTLST; do - domain=$(echo $pinghost | awk -F/ '{print $3}') - if [ -z "$INTERFACE" ]; then - ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') - else - ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') - fi - echo "host: $domain - ping: $ping" - if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then - bestping=$ping - HOST=$pinghost - fi - done -fi +echo "Select best test server..." +HOSTLST="http://scaleway.testdebit.info/10G.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" +bestping="9999" +for pinghost in $HOSTLST; do + domain=$(echo $pinghost | awk -F/ '{print $3}') + if [ -z "$INTERFACE" ] || [ "$FORCEVPS" = true ]; then + ping=$(ping -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') + else + ping=$(ping -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n') + fi + echo "host: $domain - ping: $ping" + if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then + bestping=$ping + HOST=$pinghost + fi +done [ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin" diff --git a/openmptcprouter/files/bin/omr-test-speedv6 b/openmptcprouter/files/bin/omr-test-speedv6 index 3db10fee9..32269f215 100755 --- a/openmptcprouter/files/bin/omr-test-speedv6 +++ b/openmptcprouter/files/bin/omr-test-speedv6 @@ -1,8 +1,8 @@ #!/bin/sh # vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 : -HETZNER=false -if [ "$1" = "hetzner" ]; then - HETZNER=true +FORCEVPS=false +if [ "$1" = "forcevps" ]; then + FORCEVPS=true INTERFACE="$2" else INTERFACE="$1" @@ -14,23 +14,22 @@ fi } -if [ "$HETZNER" = false ]; then - echo "Select best test server..." - HOSTLST="http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 http://speedtest.tele2.net/1000GB.zip https://speed.hetzner.de/10GB.bin http://ipv6.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" - bestping="9999" - for pinghost in $HOSTLST; do - domain=$(echo $pinghost | awk -F/ '{print $3}') - if [ -z "$INTERFACE" ]; then - ping=$(ping -6 -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1) - else - ping=$(ping -6 -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1) - fi - echo "host: $domain - ping: $ping" - if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then - bestping=$ping - HOST=$pinghost - fi - done +echo "Select best test server..." +HOSTLST="http://scaleway.testdebit.info/10G.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv6.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" +bestping="9999" +for pinghost in $HOSTLST; do + domain=$(echo $pinghost | awk -F/ '{print $3}') + if [ -z "$INTERFACE" ] || [ "$FORCEVPS" = true ]; then + ping=$(ping -6 -c1 -w2 $domain | cut -d "/" -s -f5 | cut -d "." -f1) + else + ping=$(ping -6 -c1 -w2 -I $INTERFACE -B $domain | cut -d "/" -s -f5 | cut -d "." -f1) + fi + echo "host: $domain - ping: $ping" + if [ -n "$ping" ] && [ "$ping" -lt "$bestping" ]; then + bestping=$ping + HOST=$pinghost + fi +done fi [ -z "$HOST" ] && HOST="https://speed.hetzner.de/10GB.bin" From 0b7ee45a1a944040f361b933f2abfa70a350582f Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 4 Feb 2022 22:25:38 +0100 Subject: [PATCH 14/91] Force token reset if not working on status --- .../root/usr/libexec/rpcd/openmptcprouter | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter index e42883f1a..9c9ab517b 100755 --- a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter +++ b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter @@ -931,6 +931,11 @@ function interfaces_status() else mArray.openmptcprouter["vps_admin"] = false mArray.openmptcprouter["vps_admin_error_msg"] = "No result" + uci:set("openmptcprouter",s[".name"],"admin_error","1") + mArray.openmptcprouter["vps_admin_error"] = true + uci:delete("openmptcprouter",s[".name"],"token") + uci:save("openmptcprouter",s[".name"]) + uci:commit("openmptcprouter",s[".name"]) end else mArray.openmptcprouter["vps_admin"] = false From fa07ce7e73d938b1dba1e14d002c8fda502fac9d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 4 Feb 2022 22:26:10 +0100 Subject: [PATCH 15/91] Use speedtestc++ instead of speedtestc --- openmptcprouter-full/Makefile | 2 +- speedtestcpp/Makefile | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 speedtestcpp/Makefile diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index f8b0b483d..e759dc5ee 100644 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -46,7 +46,7 @@ MY_DEPENDS := \ luci-app-openvpn \ shadowsocks-libev-ss-server shadowsocks-libev-ss-tunnel \ omr-6in4 ip6tables-mod-nat luci-proto-ipv6 6to4 6in4 6rd ip6tables \ - speedtestc \ + speedtestcpp \ iftop \ htop \ nano \ diff --git a/speedtestcpp/Makefile b/speedtestcpp/Makefile new file mode 100644 index 000000000..db25f5bb8 --- /dev/null +++ b/speedtestcpp/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2021 Ycarus (Yannick Chabanois) for OpenMPTCProuter project +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=speedtestcpp +PKG_VERSION:=1.12 +PKG_RELEASE:=2 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=a01ae6eb04c5d3f4847aef73bf77849275ccc6eb +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/fmantz/SpeedTest.git + +PKG_MAINTAINER:=Ycarus +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE + +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/speedtestcpp + SECTION:=net + CATEGORY:=Network + TITLE:=Yet another unofficial speedtest.net client cli interface + URL:=https://github.com/fmantz/SpeedTest + DEPENDS:=+curl +libstdcpp +libopenssl +libxml2 +endef + +define Package/speedtestcpp/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/SpeedTest $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/speedtestJson $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,speedtestcpp)) \ No newline at end of file From 6a0fa5b88c666a230cc043a7e405df40a7767d21 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 7 Feb 2022 22:11:52 +0100 Subject: [PATCH 16/91] Use latest iproute2 package for MPTCP upstream --- iproute2/Makefile | 246 ++++++++++++++++++ iproute2/patches/100-configure.patch | 12 + iproute2/patches/110-darwin_fixes.patch | 59 +++++ .../patches/115-add-config-xtlibdir.patch | 12 + .../120-no_arpd_ifstat_rtacct_lnstat.patch | 20 ++ .../130-no_netem_tipc_dcb_man_vdpa.patch | 11 + iproute2/patches/140-allow_pfifo_fast.patch | 9 + .../patches/140-keep_libmnl_optional.patch | 11 + .../patches/145-keep_libelf_optional.patch | 11 + .../patches/150-keep_libcap_optional.patch | 11 + iproute2/patches/160-libnetlink-pic.patch | 11 + .../patches/175-reduce-dynamic-syms.patch | 45 ++++ iproute2/patches/180-drop_FAILED_POLICY.patch | 41 +++ iproute2/patches/190-fix-nls-rpath-link.patch | 20 ++ .../patches/200-drop_libbsd_dependency.patch | 19 ++ .../patches/300-selinux-configurable.patch | 11 + 16 files changed, 549 insertions(+) create mode 100644 iproute2/Makefile create mode 100644 iproute2/patches/100-configure.patch create mode 100644 iproute2/patches/110-darwin_fixes.patch create mode 100644 iproute2/patches/115-add-config-xtlibdir.patch create mode 100644 iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch create mode 100644 iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch create mode 100644 iproute2/patches/140-allow_pfifo_fast.patch create mode 100644 iproute2/patches/140-keep_libmnl_optional.patch create mode 100644 iproute2/patches/145-keep_libelf_optional.patch create mode 100644 iproute2/patches/150-keep_libcap_optional.patch create mode 100644 iproute2/patches/160-libnetlink-pic.patch create mode 100644 iproute2/patches/175-reduce-dynamic-syms.patch create mode 100644 iproute2/patches/180-drop_FAILED_POLICY.patch create mode 100644 iproute2/patches/190-fix-nls-rpath-link.patch create mode 100644 iproute2/patches/200-drop_libbsd_dependency.patch create mode 100644 iproute2/patches/300-selinux-configurable.patch diff --git a/iproute2/Makefile b/iproute2/Makefile new file mode 100644 index 000000000..1405f0752 --- /dev/null +++ b/iproute2/Makefile @@ -0,0 +1,246 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=iproute2 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/network/iproute2/iproute2.git +PKG_SOURCE_VERSION:=29da83f89f6e1fe528c59131a01f5d43bcd0a000 +PKG_VERSION:=5.16.0-$(PKG_SOURCE_VERSION) + +PKG_BUILD_PARALLEL:=1 +PKG_BUILD_DEPENDS:=iptables +PKG_LICENSE:=GPL-2.0 +PKG_CPE_ID:=cpe:/a:iproute2_project:iproute2 + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/iproute2/Default + SECTION:=net + CATEGORY:=Network + URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 + SUBMENU:=Routing and Redirection + MAINTAINER:=Russell Senior +endef + +define Package/ip-tiny +$(call Package/iproute2/Default) + TITLE:=Routing control utility (minimal) + VARIANT:=iptiny + DEFAULT_VARIANT:=1 + PROVIDES:=ip + ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/ip-full +$(call Package/iproute2/Default) + TITLE:=Routing control utility (full) + VARIANT:=ipfull + PROVIDES:=ip + ALTERNATIVES:=300:/sbin/ip:/usr/libexec/ip-full + DEPENDS:=+libnl-tiny +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-tiny +$(call Package/iproute2/Default) + TITLE:=Traffic control utility (minimal) + VARIANT:=tctiny + DEFAULT_VARIANT:=1 + PROVIDES:=tc + ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny + DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-full +$(call Package/iproute2/Default) + TITLE:=Traffic control utility (full) + VARIANT:=tcfull + PROVIDES:=tc + ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-full + DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/tc-mod-iptables +$(call Package/iproute2/Default) + TITLE:=Traffic control module - iptables action + DEPENDS:=+libxtables +endef + +define Package/genl +$(call Package/iproute2/Default) + TITLE:=General netlink utility frontend + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/ip-bridge +$(call Package/iproute2/Default) + TITLE:=Bridge configuration utility from iproute2 + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/ss +$(call Package/iproute2/Default) + TITLE:=Socket statistics utility + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +kmod-netlink-diag +endef + +define Package/nstat +$(call Package/iproute2/Default) + TITLE:=Network statistics utility + DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +endef + +define Package/devlink +$(call Package/iproute2/Default) + TITLE:=Network devlink utility + DEPENDS:=+libmnl +endef + +define Package/rdma +$(call Package/iproute2/Default) + TITLE:=Network rdma utility + DEPENDS:=+libmnl +endef + +ifeq ($(BUILD_VARIANT),iptiny) + IP_CONFIG_TINY:=y + LIBBPF_FORCE:=off +endif + +ifeq ($(BUILD_VARIANT),ipfull) + HAVE_ELF:=y + LIBBPF_FORCE:=on +endif + +ifeq ($(BUILD_VARIANT),tctiny) + LIBBPF_FORCE:=off + SHARED_LIBS:=y +endif + +ifeq ($(BUILD_VARIANT),tcfull) + HAVE_ELF:=y + LIBBPF_FORCE:=on + SHARED_LIBS:=y +endif + +ifdef CONFIG_PACKAGE_devlink + HAVE_MNL:=y +endif + +ifdef CONFIG_PACKAGE_rdma + HAVE_MNL:=y +endif + +define Build/Configure + echo "static const char SNAPSHOT[] = \"$(PKG_VERSION)-$(PKG_RELEASE)-openwrt\";" \ + > $(PKG_BUILD_DIR)/include/SNAPSHOT.h +endef + +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed +TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny + +MAKE_FLAGS += \ + KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \ + SHARED_LIBS=$(SHARED_LIBS) \ + IP_CONFIG_TINY=$(IP_CONFIG_TINY) \ + BUILD_VARIANT=$(BUILD_VARIANT) \ + LIBBPF_FORCE=$(LIBBPF_FORCE) \ + HAVE_ELF=$(HAVE_ELF) \ + HAVE_MNL=$(HAVE_MNL) \ + HAVE_CAP=$(HAVE_CAP) \ + IPT_LIB_DIR=/usr/lib/iptables \ + XT_LIB_DIR=/usr/lib/iptables \ + FPIC="$(FPIC)" \ + $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') + +define Build/Compile + +$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/iproute2 + $(CP) $(PKG_BUILD_DIR)/include/bpf_elf.h $(1)/usr/include/iproute2 + $(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/ +endef + +define Package/ip-tiny/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-tiny +endef + +define Package/ip-full/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/libexec/ip-full +endef + +define Package/tc-tiny/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny +endef + +define Package/tc-full/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full +endef + +define Package/tc-mod-iptables/install + $(INSTALL_DIR) $(1)/usr/lib/tc + $(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc +endef + +define Package/genl/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/ +endef + +define Package/ip-bridge/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/ +endef + +define Package/ss/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/ +endef + +define Package/nstat/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/nstat $(1)/usr/sbin/ +endef + +define Package/devlink/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/devlink/devlink $(1)/usr/sbin/ +endef + +define Package/rdma/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/rdma/rdma $(1)/usr/sbin/ +endef + +#$(eval $(call BuildPackage,ip-tiny)) +$(eval $(call BuildPackage,ip-full)) +# build tc-mod-iptables before its dependents, to avoid +# spurious rebuilds when building multiple variants. +$(eval $(call BuildPackage,tc-mod-iptables)) +#$(eval $(call BuildPackage,tc-tiny)) +$(eval $(call BuildPackage,tc-full)) +$(eval $(call BuildPackage,genl)) +$(eval $(call BuildPackage,ip-bridge)) +$(eval $(call BuildPackage,ss)) +$(eval $(call BuildPackage,nstat)) +$(eval $(call BuildPackage,devlink)) +$(eval $(call BuildPackage,rdma)) diff --git a/iproute2/patches/100-configure.patch b/iproute2/patches/100-configure.patch new file mode 100644 index 000000000..0c19b2086 --- /dev/null +++ b/iproute2/patches/100-configure.patch @@ -0,0 +1,12 @@ +--- a/configure ++++ b/configure +@@ -34,7 +34,8 @@ int main(int argc, char **argv) { + } + EOF + +- if $CC -I$INCLUDE -o $TMPDIR/atmtest $TMPDIR/atmtest.c -latm >/dev/null 2>&1; then ++# OpenWrt: disable ATM support even if present on host system ++ if [ 1 -eq 0 ]; then + echo "TC_CONFIG_ATM:=y" >>$CONFIG + echo yes + else diff --git a/iproute2/patches/110-darwin_fixes.patch b/iproute2/patches/110-darwin_fixes.patch new file mode 100644 index 000000000..1f3eb101e --- /dev/null +++ b/iproute2/patches/110-darwin_fixes.patch @@ -0,0 +1,59 @@ +--- a/netem/maketable.c ++++ b/netem/maketable.c +@@ -10,7 +10,9 @@ + #include + #include + #include ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include ++#endif + #include + #include + #include +--- a/netem/normal.c ++++ b/netem/normal.c +@@ -8,8 +8,12 @@ + #include + #include + ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include + #include ++#else ++#define NETEM_DIST_SCALE 8192 ++#endif + + #define TABLESIZE 16384 + #define TABLEFACTOR NETEM_DIST_SCALE +--- a/netem/pareto.c ++++ b/netem/pareto.c +@@ -7,8 +7,12 @@ + #include + #include + ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include + #include ++#else ++#define NETEM_DIST_SCALE 8192 ++#endif + + static const double a=3.0; + #define TABLESIZE 16384 +--- a/netem/paretonormal.c ++++ b/netem/paretonormal.c +@@ -14,10 +14,13 @@ + #include + #include + #include ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include +- + #include + #include ++#else ++#define NETEM_DIST_SCALE 8192 ++#endif + + #define TABLESIZE 16384 + #define TABLEFACTOR NETEM_DIST_SCALE diff --git a/iproute2/patches/115-add-config-xtlibdir.patch b/iproute2/patches/115-add-config-xtlibdir.patch new file mode 100644 index 000000000..8702d5fd2 --- /dev/null +++ b/iproute2/patches/115-add-config-xtlibdir.patch @@ -0,0 +1,12 @@ +--- a/tc/Makefile ++++ b/tc/Makefile +@@ -128,6 +128,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR + ifneq ($(IPT_LIB_DIR),) + CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\" + endif ++ifneq ($(XT_LIB_DIR),) ++ CFLAGS += -DXT_LIB_DIR=\"$(XT_LIB_DIR)\" ++endif + + LEX := flex + CFLAGS += -DYY_NO_INPUT diff --git a/iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch b/iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch new file mode 100644 index 000000000..bb6a8d018 --- /dev/null +++ b/iproute2/patches/120-no_arpd_ifstat_rtacct_lnstat.patch @@ -0,0 +1,20 @@ +--- a/misc/Makefile ++++ b/misc/Makefile +@@ -2,13 +2,13 @@ + SSOBJ=ss.o ssfilter_check.o ssfilter.tab.o + LNSTATOBJ=lnstat.o lnstat_util.o + +-TARGETS=ss nstat ifstat rtacct lnstat ++TARGETS=ss nstat + + include ../config.mk + +-ifeq ($(HAVE_BERKELEY_DB),y) +- TARGETS += arpd +-endif ++#ifeq ($(HAVE_BERKELEY_DB),y) ++# TARGETS += arpd ++#endif + + all: $(TARGETS) + diff --git a/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch new file mode 100644 index 000000000..8ddb31674 --- /dev/null +++ b/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -55,7 +55,7 @@ WFLAGS += -Wmissing-declarations -Wold-s + CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS) + YACCFLAGS = -d -t -v + +-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa ++SUBDIRS=lib ip tc bridge misc genl devlink rdma + + LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a + LDLIBS += $(LIBNETLINK) diff --git a/iproute2/patches/140-allow_pfifo_fast.patch b/iproute2/patches/140-allow_pfifo_fast.patch new file mode 100644 index 000000000..13de48f41 --- /dev/null +++ b/iproute2/patches/140-allow_pfifo_fast.patch @@ -0,0 +1,9 @@ +--- a/tc/q_fifo.c ++++ b/tc/q_fifo.c +@@ -95,5 +95,6 @@ struct qdisc_util pfifo_head_drop_qdisc_ + + struct qdisc_util pfifo_fast_qdisc_util = { + .id = "pfifo_fast", ++ .parse_qopt = fifo_parse_opt, + .print_qopt = prio_print_opt, + }; diff --git a/iproute2/patches/140-keep_libmnl_optional.patch b/iproute2/patches/140-keep_libmnl_optional.patch new file mode 100644 index 000000000..ff7e9ca4e --- /dev/null +++ b/iproute2/patches/140-keep_libmnl_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -387,7 +387,7 @@ check_selinux() + + check_mnl() + { +- if ${PKG_CONFIG} libmnl --exists; then ++ if [ "${HAVE_MNL}" = "y" ] && ${PKG_CONFIG} libmnl --exists; then + echo "HAVE_MNL:=y" >>$CONFIG + echo "yes" + diff --git a/iproute2/patches/145-keep_libelf_optional.patch b/iproute2/patches/145-keep_libelf_optional.patch new file mode 100644 index 000000000..079ca0512 --- /dev/null +++ b/iproute2/patches/145-keep_libelf_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -255,7 +255,7 @@ EOF + + check_elf() + { +- if ${PKG_CONFIG} libelf --exists; then ++ if [ "${HAVE_ELF}" = "y" ] && ${PKG_CONFIG} libelf --exists; then + echo "HAVE_ELF:=y" >>$CONFIG + echo "yes" + diff --git a/iproute2/patches/150-keep_libcap_optional.patch b/iproute2/patches/150-keep_libcap_optional.patch new file mode 100644 index 000000000..68e162416 --- /dev/null +++ b/iproute2/patches/150-keep_libcap_optional.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -445,7 +445,7 @@ EOF + + check_cap() + { +- if ${PKG_CONFIG} libcap --exists; then ++ if [ "${HAVE_CAP}" = "y" ] && ${PKG_CONFIG} libcap --exists; then + echo "HAVE_CAP:=y" >>$CONFIG + echo "yes" + diff --git a/iproute2/patches/160-libnetlink-pic.patch b/iproute2/patches/160-libnetlink-pic.patch new file mode 100644 index 000000000..145ec7a9e --- /dev/null +++ b/iproute2/patches/160-libnetlink-pic.patch @@ -0,0 +1,11 @@ +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + include ../config.mk + +-CFLAGS += -fPIC ++CFLAGS += $(FPIC) + + UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \ + inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \ diff --git a/iproute2/patches/175-reduce-dynamic-syms.patch b/iproute2/patches/175-reduce-dynamic-syms.patch new file mode 100644 index 000000000..c3892e5a0 --- /dev/null +++ b/iproute2/patches/175-reduce-dynamic-syms.patch @@ -0,0 +1,45 @@ +--- a/tc/Makefile ++++ b/tc/Makefile +@@ -114,7 +114,7 @@ LDLIBS += -L. -lm + + ifeq ($(SHARED_LIBS),y) + LDLIBS += -ldl +-LDFLAGS += -Wl,-export-dynamic ++LDFLAGS += -Wl,--dynamic-list=dynsyms.list + endif + + TCLIB := tc_core.o +@@ -144,7 +144,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc + all: tc $(TCSO) + + tc: $(TCOBJ) $(LIBNETLINK) libtc.a +- $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@ ++ $(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@ + + libtc.a: $(TCLIB) + $(QUIET_AR)$(AR) rcs $@ $^ +@@ -166,6 +166,7 @@ install: all + clean: + rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \ + rm -f emp_ematch.tab.* ++ rm -f dynsyms.list + + q_atm.so: q_atm.c + $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm +@@ -205,4 +206,16 @@ static-syms.h: $(wildcard *.c) + sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ + done > $@ + ++else ++ ++tc: dynsyms.list ++m_xt.so: dynsyms.list ++dynsyms.list: $(wildcard *.c) ++ files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \ ++ echo "{" > $@ ; \ ++ for s in `grep -B 3 '\> $@ ; \ ++ echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@ ++ + endif diff --git a/iproute2/patches/180-drop_FAILED_POLICY.patch b/iproute2/patches/180-drop_FAILED_POLICY.patch new file mode 100644 index 000000000..07d5230a6 --- /dev/null +++ b/iproute2/patches/180-drop_FAILED_POLICY.patch @@ -0,0 +1,41 @@ +From 4e7dbf76227e8c7be7897dc81def3011f637864d Mon Sep 17 00:00:00 2001 +From: Jonas Gorski +Date: Thu, 30 May 2013 11:54:04 +0200 +Subject: [PATCH] add support for dropping with FAILED_POLICY + +--- + include/linux/fib_rules.h | 4 ++++ + include/linux/rtnetlink.h | 1 + + ip/rtm_map.c | 4 ++++ + 3 files changed, 9 insertions(+) + +--- a/ip/rtm_map.c ++++ b/ip/rtm_map.c +@@ -54,6 +54,8 @@ char *rtnl_rtntype_n2a(int id, char *buf + return "nat"; + case RTN_XRESOLVE: + return "xresolve"; ++ case RTN_FAILED_POLICY: ++ return "failed_policy"; + default: + snprintf(buf, len, "%d", id); + return buf; +@@ -89,6 +91,8 @@ int rtnl_rtntype_a2n(int *id, char *arg) + res = RTN_UNICAST; + else if (strcmp(arg, "throw") == 0) + res = RTN_THROW; ++ else if (strcmp(arg, "failed_policy") == 0) ++ res = RTN_FAILED_POLICY; + else { + res = strtoul(arg, &end, 0); + if (!end || end == arg || *end || res > 255) +--- a/include/uapi/linux/rtnetlink.h ++++ b/include/uapi/linux/rtnetlink.h +@@ -256,6 +256,7 @@ enum { + RTN_THROW, /* Not in this table */ + RTN_NAT, /* Translate this address */ + RTN_XRESOLVE, /* Use external resolver */ ++ RTN_FAILED_POLICY, /* Source address failed policy */ + __RTN_MAX + }; + diff --git a/iproute2/patches/190-fix-nls-rpath-link.patch b/iproute2/patches/190-fix-nls-rpath-link.patch new file mode 100644 index 000000000..92d02b9a4 --- /dev/null +++ b/iproute2/patches/190-fix-nls-rpath-link.patch @@ -0,0 +1,20 @@ +--- a/configure ++++ b/configure +@@ -279,7 +279,7 @@ int main(int argc, char **argv) { + } + EOF + +- $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1 ++ $CC -o $TMPDIR/libbpf_test $TMPDIR/libbpf_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1 + local ret=$? + + rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test +@@ -297,7 +297,7 @@ int main(int argc, char **argv) { + } + EOF + +- $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS >/dev/null 2>&1 ++ $CC -o $TMPDIR/libbpf_sec_test $TMPDIR/libbpf_sec_test.c $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS >/dev/null 2>&1 + local ret=$? + + rm -f $TMPDIR/libbpf_sec_test.c $TMPDIR/libbpf_sec_test diff --git a/iproute2/patches/200-drop_libbsd_dependency.patch b/iproute2/patches/200-drop_libbsd_dependency.patch new file mode 100644 index 000000000..12a1ccfa3 --- /dev/null +++ b/iproute2/patches/200-drop_libbsd_dependency.patch @@ -0,0 +1,19 @@ +--- a/configure ++++ b/configure +@@ -431,14 +431,8 @@ EOF + if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then + echo "no" + else +- if ${PKG_CONFIG} libbsd --exists; then +- echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG +- echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG +- echo "no" +- else +- echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG +- echo "yes" +- fi ++ echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG ++ echo "yes" + fi + rm -f $TMPDIR/strtest.c $TMPDIR/strtest + } diff --git a/iproute2/patches/300-selinux-configurable.patch b/iproute2/patches/300-selinux-configurable.patch new file mode 100644 index 000000000..b7e61fd3b --- /dev/null +++ b/iproute2/patches/300-selinux-configurable.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -374,7 +374,7 @@ check_libbpf() + check_selinux() + # SELinux is a compile time option in the ss utility + { +- if ${PKG_CONFIG} libselinux --exists; then ++ if [ "${HAVE_SELINUX}" = "y" ] && ${PKG_CONFIG} libselinux --exists; then + echo "HAVE_SELINUX:=y" >>$CONFIG + echo "yes" + From 1b7cd710219ed2dcf2be45ab34e38e4551acb75c Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Tue, 8 Feb 2022 18:06:32 +0800 Subject: [PATCH 17/91] update modemmanager libmbim version 18.4 --- libmbim/Makefile | 4 ++-- modemmanager/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmbim/Makefile b/libmbim/Makefile index 32c8ef493..505ae7bc6 100644 --- a/libmbim/Makefile +++ b/libmbim/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmbim -PKG_VERSION:=1.26.0 +PKG_VERSION:=1.26.2 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libmbim -PKG_HASH:=1e1f0926b22c77210442129eca689722ecf324ab9c9abf421a5c989f46e813cf +PKG_HASH:=10c77bf5b5eb8c92ba80e9b519923ad9b898362bc8e1928e2bc9a17eeba649af PKG_MAINTAINER:=Nicholas Smith diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 570bc9293..1dbccf127 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.2 +PKG_VERSION:=1.18.4 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=374be158ae1c1fb38a29eef1cc3cdf89ff3536b48ff1320d208ab204ea6c5f8a +PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith From 1b88a0262c911f6a6ffee5cf3c2bb3459ec6905e Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Tue, 8 Feb 2022 19:20:44 +0800 Subject: [PATCH 18/91] Revert "update modemmanager libmbim version 18.4" This reverts commit 1b7cd710219ed2dcf2be45ab34e38e4551acb75c. --- libmbim/Makefile | 4 ++-- modemmanager/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmbim/Makefile b/libmbim/Makefile index 505ae7bc6..32c8ef493 100644 --- a/libmbim/Makefile +++ b/libmbim/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmbim -PKG_VERSION:=1.26.2 +PKG_VERSION:=1.26.0 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libmbim -PKG_HASH:=10c77bf5b5eb8c92ba80e9b519923ad9b898362bc8e1928e2bc9a17eeba649af +PKG_HASH:=1e1f0926b22c77210442129eca689722ecf324ab9c9abf421a5c989f46e813cf PKG_MAINTAINER:=Nicholas Smith diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 1dbccf127..570bc9293 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.4 +PKG_VERSION:=1.18.2 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 +PKG_HASH:=374be158ae1c1fb38a29eef1cc3cdf89ff3536b48ff1320d208ab204ea6c5f8a PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith From 59eb792d64b02fac3769c6917180f273a87f6ed4 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Wed, 9 Feb 2022 23:46:08 +0800 Subject: [PATCH 19/91] fix --- modemmanager/Makefile | 4 +- ...-avoid-0-9-as-shell-globbing-patters.patch | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 570bc9293..1dbccf127 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.2 +PKG_VERSION:=1.18.4 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=374be158ae1c1fb38a29eef1cc3cdf89ff3536b48ff1320d208ab204ea6c5f8a +PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith diff --git a/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch b/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch new file mode 100644 index 000000000..1b919ba2c --- /dev/null +++ b/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch @@ -0,0 +1,60 @@ +From e9f254ba3f923248efffe4fd458dc5e5469e0f73 Mon Sep 17 00:00:00 2001 +From: Aleksander Morgado +Date: Wed, 1 Dec 2021 21:40:00 +0100 +Subject: [PATCH] udev: avoid [0-9]* as shell globbing patterns + +The udev rules expect matches based on shell globbing pattern, not +based on regex. This means that "[0-9]*" doesn't mean "zero or more +digits", it actually means "one digit and zero or more other +characters". + +So, avoid the regex like match, even if it worked for us, because it +didn't mean what we thought it meant, plus, it breaks our custom udev +rules processing logic, in which we convert the input patterns into +real regex expressions. + +See https://bbs.archlinux.org/viewtopic.php?pid=1415916#p1415916 + +While at it, also make sure that the wildcard matching is done +exclusively for prefix and suffix matches, never in the middle of +a string, or our custom rules parser would not match correctly. +--- + plugins/qcom-soc/77-mm-qcom-soc.rules | 8 ++++---- + src/80-mm-candidate.rules | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +--- a/plugins/qcom-soc/77-mm-qcom-soc.rules ++++ b/plugins/qcom-soc/77-mm-qcom-soc.rules +@@ -24,17 +24,17 @@ ENV{ID_MM_QCOM_SOC}="1" + ENV{ID_MM_PHYSDEV_UID}="qcom-soc" + + # port type hints for the rpmsgexport-ed ports +-SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +-SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" ++SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}=="*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" ++SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}!="*_CNTL", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" + + # ignore every other port without explicit hints + SUBSYSTEM=="rpmsg", ENV{ID_MM_PORT_TYPE_QMI}!="1", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}!="1", ENV{ID_MM_PORT_IGNORE}="1" + + # explicitly ignore ports intended for USB tethering (DATA40, DATA40_CNTL) + SUBSYSTEM=="rpmsg", ATTR{name}=="DATA40*", ENV{ID_MM_PORT_IGNORE}="1" +-KERNEL=="rmnet_usb[0-9]*", ENV{ID_MM_PORT_IGNORE}="1" ++KERNEL=="rmnet_usb*", ENV{ID_MM_PORT_IGNORE}="1" + + # flag all rpmsg ports under this plugin as candidate +-KERNEL=="rpmsg[0-9]*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" ++KERNEL=="rpmsg*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" + + LABEL="mm_qcom_soc_end" +--- a/src/80-mm-candidate.rules ++++ b/src/80-mm-candidate.rules +@@ -15,7 +15,7 @@ KERNEL=="rfcomm*", DEVPATH=="*/virtual/* + + SUBSYSTEM=="tty", ENV{ID_MM_CANDIDATE}="1" + SUBSYSTEM=="net", ENV{ID_MM_CANDIDATE}="1" +-KERNEL=="cdc-wdm[0-9]*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" ++KERNEL=="cdc-wdm*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" + + # WWAN subsystem port handling + # - All USB devices ignored for now, only PCI devices expected From 5e68aa0dd5de4109600db057ffa748793e681ba9 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 00:17:48 +0800 Subject: [PATCH 20/91] update mm --- modemmanager/Makefile | 5 ++- modemmanager/files/modemmanager.common | 8 ++--- modemmanager/files/modemmanager.init | 10 +++--- modemmanager/files/modemmanager.proto | 21 +++++------- .../files/usr/sbin/ModemManager-wrapper | 33 ------------------- 5 files changed, 20 insertions(+), 57 deletions(-) mode change 100644 => 100755 modemmanager/files/modemmanager.init delete mode 100755 modemmanager/files/usr/sbin/ModemManager-wrapper diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 1dbccf127..285dc475c 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager PKG_VERSION:=1.18.4 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) -PKG_MAINTAINER:=Nicholas Smith +PKG_MAINTAINER:=Nicholas Smith PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING @@ -98,7 +98,6 @@ define Package/modemmanager/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin - $(INSTALL_BIN) ./files/usr/sbin/ModemManager-wrapper $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin diff --git a/modemmanager/files/modemmanager.common b/modemmanager/files/modemmanager.common index a439179de..b4139abad 100644 --- a/modemmanager/files/modemmanager.common +++ b/modemmanager/files/modemmanager.common @@ -20,7 +20,7 @@ MODEMMANAGER_EVENTS_CACHE="${MODEMMANAGER_RUNDIR}/events.cache" # Common logging mm_log() { - [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && logger -t "ModemManager" "hotplug: $*" + logger -t "ModemManager" "hotplug: $*" } ################################################################################ @@ -39,14 +39,14 @@ mm_find_physdev_sysfs_path() { # avoid infinite loops iterating [ -z "${tmp_path}" ] || [ "${tmp_path}" = "/" ] && return - # for USB devices, the physical device will be that with a idVendor - # and idProduct pair of files + # For USB devices, the physical device will be that with a idVendor + # and idProduct pair of files [ -f "${tmp_path}"/idVendor ] && [ -f "${tmp_path}"/idProduct ] && { tmp_path=$(readlink -f "$tmp_path") echo "${tmp_path}" return } - + # For PCI devices, the physical device will be that with a vendor # and device pair of files [ -f "${tmp_path}"/vendor ] && [ -f "${tmp_path}"/device ] && { diff --git a/modemmanager/files/modemmanager.init b/modemmanager/files/modemmanager.init old mode 100644 new mode 100755 index a3f6c1b12..b3f9f9290 --- a/modemmanager/files/modemmanager.init +++ b/modemmanager/files/modemmanager.init @@ -22,12 +22,14 @@ start_service() { # it starts. # # All these commands need to be executed on every MM start, even after - # procd-triggered respawns, which is why this is wrapped in a startup - # wrapper script called '/usr/sbin/ModemManager-wrapper'. + # procd-triggered respawns, which is why they're all included as instance command # - . /usr/share/ModemManager/modemmanager.common procd_open_instance - procd_set_param command /usr/sbin/ModemManager-wrapper + procd_set_param command sh -c ". /usr/share/ModemManager/modemmanager.common; \ + mkdir -m 0755 -p ${MODEMMANAGER_RUNDIR}; \ + mm_cleanup_interfaces; \ + ( mm_report_events_from_cache ) >/dev/null 2>&1 & \ + /usr/sbin/ModemManager" procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}" procd_set_param pidfile "${MODEMMANAGER_PID_FILE}" procd_close_instance diff --git a/modemmanager/files/modemmanager.proto b/modemmanager/files/modemmanager.proto index 0e050e7b9..d24910b98 100755 --- a/modemmanager/files/modemmanager.proto +++ b/modemmanager/files/modemmanager.proto @@ -197,7 +197,6 @@ modemmanager_connected_method_dhcp_ipv4() { local interface="$1" local wwan="$2" local metric="$3" - local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -223,7 +222,6 @@ modemmanager_connected_method_static_ipv4() { local dns1="$7" local dns2="$8" local metric="$9" - local defaultroute="$10" local mask="" @@ -244,9 +242,8 @@ modemmanager_connected_method_static_ipv4() { proto_set_keep 1 echo "adding IPv4 address ${address}, netmask ${mask}" proto_add_ipv4_address "${address}" "${mask}" - [ -n "${gateway}" ] && [ "${defaultroute}" != 0 ] && { + [ -n "${gateway}" ] && { echo "adding default IPv4 route via ${gateway}" - logger -t "modemmanager.proto" "adding default IPv4 route via ${gateway} ${address}" proto_add_ipv4_route "0.0.0.0" "0" "${gateway}" "${address}" } [ -n "${dns1}" ] && { @@ -265,7 +262,6 @@ modemmanager_connected_method_dhcp_ipv6() { local interface="$1" local wwan="$2" local metric="$3" - local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -292,7 +288,6 @@ modemmanager_connected_method_static_ipv6() { local dns1="$7" local dns2="$8" local metric="$9" - local defaultroute="$10" [ -n "${address}" ] || { proto_notify_error "${interface}" ADDRESS_MISSING @@ -311,7 +306,7 @@ modemmanager_connected_method_static_ipv6() { echo "adding IPv6 address ${address}, prefix ${prefix}" proto_add_ipv6_address "${address}" "128" proto_add_ipv6_prefix "${address}/${prefix}" - [ -n "${gateway}" ] && [ "$defaultroute" != 0 ] && { + [ -n "${gateway}" ] && { echo "adding default IPv6 route via ${gateway}" proto_add_ipv6_route "${gateway}" "128" proto_add_ipv6_route "::0" "0" "${gateway}" "" "" "${address}/${prefix}" @@ -362,9 +357,9 @@ proto_modemmanager_setup() { local device apn allowedauth username password pincode iptype metric signalrate - local address prefix gateway mtu dns1 dns2 defaultroute + local address prefix gateway mtu dns1 dns2 - json_get_vars device apn allowedauth username password pincode iptype metric signalrate defaultroute + json_get_vars device apn allowedauth username password pincode iptype metric signalrate # validate sysfs path given in config [ -n "${device}" ] || { @@ -452,7 +447,7 @@ proto_modemmanager_setup() { echo "IPv4 connection setup required in interface ${interface}: ${bearermethod_ipv4}" case "${bearermethod_ipv4}" in "dhcp") - modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" + modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.address") @@ -461,7 +456,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" + modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" ;; "ppp") modemmanager_connected_method_ppp_ipv4 "${interface}" "${beareriface}" "${username}" "${password}" "${allowedauth}" @@ -479,7 +474,7 @@ proto_modemmanager_setup() { echo "IPv6 connection setup required in interface ${interface}: ${bearermethod_ipv6}" case "${bearermethod_ipv6}" in "dhcp") - modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" + modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.address") @@ -488,7 +483,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" + modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" ;; "ppp") proto_notify_error "${interface}" "unsupported method" diff --git a/modemmanager/files/usr/sbin/ModemManager-wrapper b/modemmanager/files/usr/sbin/ModemManager-wrapper deleted file mode 100755 index 4fd64227f..000000000 --- a/modemmanager/files/usr/sbin/ModemManager-wrapper +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -trap_with_arg() { - func="$1" ; shift - for sig ; do - # shellcheck disable=SC2064 - trap "$func $sig" "$sig" - done -} - -func_trap() { - logger "ModemManager-wrapper[$$]" "Sending signal ${1}..." - kill "-${1}" "$CHILD" 2>/dev/null -} - -main() { - . /usr/share/ModemManager/modemmanager.common - - trap_with_arg func_trap INT TERM KILL - - mkdir -p "${MODEMMANAGER_RUNDIR}" - chmod 0755 "${MODEMMANAGER_RUNDIR}" - mm_cleanup_interfaces - - /usr/sbin/ModemManager "$@" 1>/dev/null 2>/dev/null & - CHILD="$!" - - mm_report_events_from_cache - - wait "$CHILD" -} - -main "$@" From f0ce784e0eaba96579cb49f4835d54f6e581717a Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 01:48:15 +0800 Subject: [PATCH 21/91] Revert "update mm" This reverts commit 5e68aa0dd5de4109600db057ffa748793e681ba9. --- modemmanager/Makefile | 5 +-- modemmanager/files/modemmanager.common | 8 ++--- modemmanager/files/modemmanager.init | 10 +++--- modemmanager/files/modemmanager.proto | 21 +++++++----- .../files/usr/sbin/ModemManager-wrapper | 33 +++++++++++++++++++ 5 files changed, 57 insertions(+), 20 deletions(-) mode change 100755 => 100644 modemmanager/files/modemmanager.init create mode 100755 modemmanager/files/usr/sbin/ModemManager-wrapper diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 285dc475c..1dbccf127 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager PKG_VERSION:=1.18.4 -PKG_RELEASE:=$(AUTORELEASE) +PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) -PKG_MAINTAINER:=Nicholas Smith +PKG_MAINTAINER:=Nicholas Smith PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING @@ -98,6 +98,7 @@ define Package/modemmanager/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin + $(INSTALL_BIN) ./files/usr/sbin/ModemManager-wrapper $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin diff --git a/modemmanager/files/modemmanager.common b/modemmanager/files/modemmanager.common index b4139abad..a439179de 100644 --- a/modemmanager/files/modemmanager.common +++ b/modemmanager/files/modemmanager.common @@ -20,7 +20,7 @@ MODEMMANAGER_EVENTS_CACHE="${MODEMMANAGER_RUNDIR}/events.cache" # Common logging mm_log() { - logger -t "ModemManager" "hotplug: $*" + [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && logger -t "ModemManager" "hotplug: $*" } ################################################################################ @@ -39,14 +39,14 @@ mm_find_physdev_sysfs_path() { # avoid infinite loops iterating [ -z "${tmp_path}" ] || [ "${tmp_path}" = "/" ] && return - # For USB devices, the physical device will be that with a idVendor - # and idProduct pair of files + # for USB devices, the physical device will be that with a idVendor + # and idProduct pair of files [ -f "${tmp_path}"/idVendor ] && [ -f "${tmp_path}"/idProduct ] && { tmp_path=$(readlink -f "$tmp_path") echo "${tmp_path}" return } - + # For PCI devices, the physical device will be that with a vendor # and device pair of files [ -f "${tmp_path}"/vendor ] && [ -f "${tmp_path}"/device ] && { diff --git a/modemmanager/files/modemmanager.init b/modemmanager/files/modemmanager.init old mode 100755 new mode 100644 index b3f9f9290..a3f6c1b12 --- a/modemmanager/files/modemmanager.init +++ b/modemmanager/files/modemmanager.init @@ -22,14 +22,12 @@ start_service() { # it starts. # # All these commands need to be executed on every MM start, even after - # procd-triggered respawns, which is why they're all included as instance command + # procd-triggered respawns, which is why this is wrapped in a startup + # wrapper script called '/usr/sbin/ModemManager-wrapper'. # + . /usr/share/ModemManager/modemmanager.common procd_open_instance - procd_set_param command sh -c ". /usr/share/ModemManager/modemmanager.common; \ - mkdir -m 0755 -p ${MODEMMANAGER_RUNDIR}; \ - mm_cleanup_interfaces; \ - ( mm_report_events_from_cache ) >/dev/null 2>&1 & \ - /usr/sbin/ModemManager" + procd_set_param command /usr/sbin/ModemManager-wrapper procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}" procd_set_param pidfile "${MODEMMANAGER_PID_FILE}" procd_close_instance diff --git a/modemmanager/files/modemmanager.proto b/modemmanager/files/modemmanager.proto index d24910b98..0e050e7b9 100755 --- a/modemmanager/files/modemmanager.proto +++ b/modemmanager/files/modemmanager.proto @@ -197,6 +197,7 @@ modemmanager_connected_method_dhcp_ipv4() { local interface="$1" local wwan="$2" local metric="$3" + local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -222,6 +223,7 @@ modemmanager_connected_method_static_ipv4() { local dns1="$7" local dns2="$8" local metric="$9" + local defaultroute="$10" local mask="" @@ -242,8 +244,9 @@ modemmanager_connected_method_static_ipv4() { proto_set_keep 1 echo "adding IPv4 address ${address}, netmask ${mask}" proto_add_ipv4_address "${address}" "${mask}" - [ -n "${gateway}" ] && { + [ -n "${gateway}" ] && [ "${defaultroute}" != 0 ] && { echo "adding default IPv4 route via ${gateway}" + logger -t "modemmanager.proto" "adding default IPv4 route via ${gateway} ${address}" proto_add_ipv4_route "0.0.0.0" "0" "${gateway}" "${address}" } [ -n "${dns1}" ] && { @@ -262,6 +265,7 @@ modemmanager_connected_method_dhcp_ipv6() { local interface="$1" local wwan="$2" local metric="$3" + local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -288,6 +292,7 @@ modemmanager_connected_method_static_ipv6() { local dns1="$7" local dns2="$8" local metric="$9" + local defaultroute="$10" [ -n "${address}" ] || { proto_notify_error "${interface}" ADDRESS_MISSING @@ -306,7 +311,7 @@ modemmanager_connected_method_static_ipv6() { echo "adding IPv6 address ${address}, prefix ${prefix}" proto_add_ipv6_address "${address}" "128" proto_add_ipv6_prefix "${address}/${prefix}" - [ -n "${gateway}" ] && { + [ -n "${gateway}" ] && [ "$defaultroute" != 0 ] && { echo "adding default IPv6 route via ${gateway}" proto_add_ipv6_route "${gateway}" "128" proto_add_ipv6_route "::0" "0" "${gateway}" "" "" "${address}/${prefix}" @@ -357,9 +362,9 @@ proto_modemmanager_setup() { local device apn allowedauth username password pincode iptype metric signalrate - local address prefix gateway mtu dns1 dns2 + local address prefix gateway mtu dns1 dns2 defaultroute - json_get_vars device apn allowedauth username password pincode iptype metric signalrate + json_get_vars device apn allowedauth username password pincode iptype metric signalrate defaultroute # validate sysfs path given in config [ -n "${device}" ] || { @@ -447,7 +452,7 @@ proto_modemmanager_setup() { echo "IPv4 connection setup required in interface ${interface}: ${bearermethod_ipv4}" case "${bearermethod_ipv4}" in "dhcp") - modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" + modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.address") @@ -456,7 +461,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" + modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" ;; "ppp") modemmanager_connected_method_ppp_ipv4 "${interface}" "${beareriface}" "${username}" "${password}" "${allowedauth}" @@ -474,7 +479,7 @@ proto_modemmanager_setup() { echo "IPv6 connection setup required in interface ${interface}: ${bearermethod_ipv6}" case "${bearermethod_ipv6}" in "dhcp") - modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" + modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.address") @@ -483,7 +488,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" + modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" ;; "ppp") proto_notify_error "${interface}" "unsupported method" diff --git a/modemmanager/files/usr/sbin/ModemManager-wrapper b/modemmanager/files/usr/sbin/ModemManager-wrapper new file mode 100755 index 000000000..4fd64227f --- /dev/null +++ b/modemmanager/files/usr/sbin/ModemManager-wrapper @@ -0,0 +1,33 @@ +#!/bin/sh + +trap_with_arg() { + func="$1" ; shift + for sig ; do + # shellcheck disable=SC2064 + trap "$func $sig" "$sig" + done +} + +func_trap() { + logger "ModemManager-wrapper[$$]" "Sending signal ${1}..." + kill "-${1}" "$CHILD" 2>/dev/null +} + +main() { + . /usr/share/ModemManager/modemmanager.common + + trap_with_arg func_trap INT TERM KILL + + mkdir -p "${MODEMMANAGER_RUNDIR}" + chmod 0755 "${MODEMMANAGER_RUNDIR}" + mm_cleanup_interfaces + + /usr/sbin/ModemManager "$@" 1>/dev/null 2>/dev/null & + CHILD="$!" + + mm_report_events_from_cache + + wait "$CHILD" +} + +main "$@" From 50b2d6232e89c75f05c2010d6823e138120d3e71 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 02:44:51 +0800 Subject: [PATCH 22/91] Revert "fix" This reverts commit 59eb792d64b02fac3769c6917180f273a87f6ed4. --- modemmanager/Makefile | 4 +- ...-avoid-0-9-as-shell-globbing-patters.patch | 60 ------------------- 2 files changed, 2 insertions(+), 62 deletions(-) delete mode 100644 modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 1dbccf127..570bc9293 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.4 +PKG_VERSION:=1.18.2 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 +PKG_HASH:=374be158ae1c1fb38a29eef1cc3cdf89ff3536b48ff1320d208ab204ea6c5f8a PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith diff --git a/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch b/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch deleted file mode 100644 index 1b919ba2c..000000000 --- a/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch +++ /dev/null @@ -1,60 +0,0 @@ -From e9f254ba3f923248efffe4fd458dc5e5469e0f73 Mon Sep 17 00:00:00 2001 -From: Aleksander Morgado -Date: Wed, 1 Dec 2021 21:40:00 +0100 -Subject: [PATCH] udev: avoid [0-9]* as shell globbing patterns - -The udev rules expect matches based on shell globbing pattern, not -based on regex. This means that "[0-9]*" doesn't mean "zero or more -digits", it actually means "one digit and zero or more other -characters". - -So, avoid the regex like match, even if it worked for us, because it -didn't mean what we thought it meant, plus, it breaks our custom udev -rules processing logic, in which we convert the input patterns into -real regex expressions. - -See https://bbs.archlinux.org/viewtopic.php?pid=1415916#p1415916 - -While at it, also make sure that the wildcard matching is done -exclusively for prefix and suffix matches, never in the middle of -a string, or our custom rules parser would not match correctly. ---- - plugins/qcom-soc/77-mm-qcom-soc.rules | 8 ++++---- - src/80-mm-candidate.rules | 2 +- - 2 files changed, 5 insertions(+), 5 deletions(-) - ---- a/plugins/qcom-soc/77-mm-qcom-soc.rules -+++ b/plugins/qcom-soc/77-mm-qcom-soc.rules -@@ -24,17 +24,17 @@ ENV{ID_MM_QCOM_SOC}="1" - ENV{ID_MM_PHYSDEV_UID}="qcom-soc" - - # port type hints for the rpmsgexport-ed ports --SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" --SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" -+SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}=="*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" -+SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}!="*_CNTL", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" - - # ignore every other port without explicit hints - SUBSYSTEM=="rpmsg", ENV{ID_MM_PORT_TYPE_QMI}!="1", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}!="1", ENV{ID_MM_PORT_IGNORE}="1" - - # explicitly ignore ports intended for USB tethering (DATA40, DATA40_CNTL) - SUBSYSTEM=="rpmsg", ATTR{name}=="DATA40*", ENV{ID_MM_PORT_IGNORE}="1" --KERNEL=="rmnet_usb[0-9]*", ENV{ID_MM_PORT_IGNORE}="1" -+KERNEL=="rmnet_usb*", ENV{ID_MM_PORT_IGNORE}="1" - - # flag all rpmsg ports under this plugin as candidate --KERNEL=="rpmsg[0-9]*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" -+KERNEL=="rpmsg*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" - - LABEL="mm_qcom_soc_end" ---- a/src/80-mm-candidate.rules -+++ b/src/80-mm-candidate.rules -@@ -15,7 +15,7 @@ KERNEL=="rfcomm*", DEVPATH=="*/virtual/* - - SUBSYSTEM=="tty", ENV{ID_MM_CANDIDATE}="1" - SUBSYSTEM=="net", ENV{ID_MM_CANDIDATE}="1" --KERNEL=="cdc-wdm[0-9]*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" -+KERNEL=="cdc-wdm*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" - - # WWAN subsystem port handling - # - All USB devices ignored for now, only PCI devices expected From 26585702bad44aa5c00ff764a39c5a270bb7cafc Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 9 Feb 2022 20:29:04 +0100 Subject: [PATCH 23/91] Update ModemManager --- modemmanager/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 570bc9293..1dbccf127 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.2 +PKG_VERSION:=1.18.4 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=374be158ae1c1fb38a29eef1cc3cdf89ff3536b48ff1320d208ab204ea6c5f8a +PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith From 1699147b924dcd518e1ae80c64b39a9e39a42e70 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 9 Feb 2022 20:29:21 +0100 Subject: [PATCH 24/91] More check on post tracking --- .../share/omr/post-tracking.d/post-tracking | 88 ++++++++++++------- 1 file changed, 55 insertions(+), 33 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 c96828632..50fa888b7 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -725,7 +725,9 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then else _log "$OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) switched off because $OMR_TRACKER_STATUS_MSG" fi - uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='down' + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='down' + fi #if [ "$(sysctl -n net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ]; then # multipath "$OMR_TRACKER_DEVICE" off > /dev/null 2>&1 #fi @@ -738,10 +740,12 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ] && [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "openvpn" ]; then VPN_BASE_INTF="$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.baseintf)" VPN_BASE_INTF_IP=$(ubus call network.interface.$VPN_BASE_INTF status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n") - uci -q batch <<-EOF >/dev/null - set openvpn.$VPN_BASE_INTF.local=$VPN_BASE_INTF_IP - commit openvpn - EOF + if [ -n "$VPN_BASE_INTF" ]; then + uci -q batch <<-EOF >/dev/null + set openvpn.$VPN_BASE_INTF.local=$VPN_BASE_INTF_IP + commit openvpn + EOF + fi /etc/init.d/openvpn restart $VPN_BASE_INTF fi config_load openmptcprouter @@ -769,7 +773,11 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then config_foreach set_route6 interface $OMR_TRACKER_INTERFACE "no" fi fi - mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)" + + mail_alert="" + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)" + fi [ -z "$mail_alert" ] && mail_alert="$(uci -q get omr-tracker.defaults.mail_alert)" [ "$mail_alert" = "1" ] && [ -n "$(uci -q get mail.default.to)" ] && { OMR_SYSNAME="$(uci -q get system.@system[0].hostname)" @@ -783,10 +791,16 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then echo -e "Subject: $OMR_SYSNAME: $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) is down\n\nConnection failure of $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) detected. The reason is \"$OMR_TRACKER_STATUS_MSG\"." | sendmail $(uci -q get mail.default.to) fi } - script_alert_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_down)" + script_alert_down="" + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + script_alert_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_down)" + fi [ -n "$script_alert_down" ] && eval $script_alert_down - restart_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.restart_down)" + restart_down="" + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + restart_down="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.restart_down)" + fi [ -z "$restart_down" ] && restart_down="$(uci -q get omr-tracker.defaults.restart_down)" [ "$restart_down" = "1" ] && { _log "Restart $OMR_TRACKER_INTERFACE" @@ -839,7 +853,9 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then fi fi dns_flush - uci -q delete openmptcprouter.$OMR_TRACKER_INTERFACE.lc + if [ -n "$OMR_TRACKER_INTERFACE" ]; then + uci -q delete openmptcprouter.$OMR_TRACKER_INTERFACE.lc + fi uci -q commit openmptcprouter #ubus call network reload @@ -924,7 +940,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om exit 0 fi -if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]; then if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='up' uci -q commit openmptcprouter @@ -932,7 +948,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]; then exit 0 fi -if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR_TRACKER_STATUS" ]; then +if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR_TRACKER_STATUS" ] && [ -n "$OMR_TRACKER_INTERFACE" ]; then _log "$OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE) switched up" mail_alert="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.mail_alert)" [ -z "$mail_alert" ] && mail_alert="$(uci -q get omr-tracker.defaults.mail_alert)" @@ -951,18 +967,20 @@ if [ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR script_alert_up="$(uci -q get omr-tracker.$OMR_TRACKER_INTERFACE.script_alert_up)" [ -n "$script_alert_up" ] && eval $script_alert_up fi -if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" != "up" ]; then uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state='up' uci -q commit openmptcprouter dns_flush fi -multipath_config=$(uci -q get "openmtpcprouter.$OMR_TRACKER_INTERFACE.multipath") -[ -z "$multipath_config" ] && multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath" || echo "off") -[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" = "1" ] && { - [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "openvpn" ] && multipath_config_route="$(uci -q get openmptcprouter.ovpn${OMR_TRACKER_INTERFACE}.multipath || echo "off")" - [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "wireguard" ] && multipath_config_route="$(uci -q get openmptcprouter.wg${OMR_TRACKER_INTERFACE}.multipath || echo "off")" -} +if [ -n "$OMR_TRACKER_INTERFACE" ]; then + multipath_config=$(uci -q get "openmtpcprouter.$OMR_TRACKER_INTERFACE.multipath") + [ -z "$multipath_config" ] && multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath" || echo "off") + [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" = "1" ] && { + [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "openvpn" ] && multipath_config_route="$(uci -q get openmptcprouter.ovpn${OMR_TRACKER_INTERFACE}.multipath || echo "off")" + [ "$(uci -q get openmptcprouter.settings.mptcpovervpn)" = "wireguard" ] && multipath_config_route="$(uci -q get openmptcprouter.wg${OMR_TRACKER_INTERFACE}.multipath || echo "off")" + } +fi if [ "$multipath_config" = "master" ]; then #if ([ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]) && [ "$OMR_TRACKER_DEVICE_GATEWAY" != "" ] && ([ "$(uci -q get openmptcprouter.settings.master)" != "balancing" ] || [ "$(uci -q get openmptcprouter.settings.vpn)" = "mlvpn" ]); then @@ -1010,7 +1028,7 @@ if [ "$multipath_config" = "master" ]; then config_foreach set_route_balancing interface config_foreach set_route_balancing6 interface [ -n "$routesbalancing" ] && { - ([ "$nbintf" -gt "1" ] && [ "$(ip r show default metric 1 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancing " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 1 | grep $OMR_TRACKER_DEVICE)" = "" ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ]) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { + ([ "$nbintf" -gt "1" ] && [ "$(ip r show default metric 1 | tr -d '\t' | tr -d '\n')" != "default via $routesbalancing " ]) || ([ "$nbintf" = "1" ] && ([ "$(ip r show default metric 1 | grep $OMR_TRACKER_DEVICE)" = "" ] || ([ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ])) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { _log "Change in routes, set ip route replace default scope global $routesbalancing (omrvpn_intf: $omrvpn_intf)" [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && _log "Current route: $(ip r)" ip route replace default scope global metric 1 $routesbalancing 2>&1 >/dev/null @@ -1024,7 +1042,7 @@ if [ "$multipath_config" = "master" ]; then } } [ -n "$routesbalancingbackup" ] && { - ([ "$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" ]) && { + ([ "$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)" = "" ] || ([ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" = "1" ])) && [ -n "$OMR_TRACKER_DEVICE_IP" ]) && { _log "Set backup ip route replace default scope global metric 999 $routesbalancingbackup" ip route replace default scope global metric 999 $routesbalancingbackup 2>&1 >/dev/null } @@ -1043,7 +1061,7 @@ if [ "$multipath_config" = "master" ]; then if [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show table 991337)" != "default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE " ]; then ip -6 route replace default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE table 991337 2>&1 >/dev/null fi - if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") + $((10 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]; then + if ([ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ]) || [ $(($(date +"%s") + $((10 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]; then [ "$(pgrep openmptcprouter-vps)" = "" ] && /etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1 fi multipath_config="on" @@ -1057,7 +1075,7 @@ if [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ]; then elif [ "$(uci -q get openmptcprouter.settings.master)" != "failover" ]; then config_foreach set_server_route server fi - if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then + if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then _log "Interface route not yet set, set route ip r add default via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" ip r add default via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric) >/dev/null 2>&1 fi @@ -1070,12 +1088,12 @@ if [ -n "$OMR_TRACKER_DEVICE_IP6" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ]; th elif [ "$(uci -q get openmptcprouter.settings.master)" != "failover" ]; then config_foreach set_server_route6 server fi - if [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then + if [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(ip -6 r show dev $OMR_TRACKER_DEVICE | grep default)" = "" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.metric)" != "" ]; then ip -6 r replace default via $OMR_TRACKER_DEVICE_GATEWAY6 dev $OMR_TRACKER_DEVICE metric $(uci -q get network.$OMR_TRACKER_INTERFACE.metric) >/dev/null 2>&1 fi fi -if [ "$multipath_config" = "on" ] || [ "$multipath_config" = "backup" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$multipath_config" = "on" ] || [ "$multipath_config" = "backup" ]); then download="$(uci -q get network.$OMR_TRACKER_INTERFACE.downloadspeed)" [ -z "$download" ] && download="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.download)" upload="$(uci -q get network.$OMR_TRACKER_INTERFACE.uploadspeed)" @@ -1144,7 +1162,7 @@ fi #ubus call network reload # Save wan settings for status page -if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") + $((30 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" = "down" ]; then +if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(date +"%s") + $((30 + RANDOM % 31)) - $(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc))) -gt 3600 ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state)" = "down" ]); then [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && _log "Get status and settings for $OMR_TRACKER_INTERFACE..." local ipaddr="" local ip6addr="" @@ -1214,7 +1232,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( local lanip="$(uci -q get network.lan.ipaddr)" local masterip get_master_ip() { - if [ "$(uci -q get openmptcprouter.$1.multipath)" = "master" ]; then + if [ -n "$1" ] && [ "$(uci -q get openmptcprouter.$1.multipath)" = "master" ]; then masterip="$(uci -q get openmptcprouter.$1.publicip)" fi } @@ -1223,7 +1241,8 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( if [ -n "$lanip" ] && [ -n "$masterip" ] && [ -n "$ipaddr" ] && [ "$ipaddr" = "$masterip" ] && [ "$(uci -q get openmptcprouter.settings.disableloopdetection)" != "1" ]; then loop=0 routingloop() { - vpsip="$(uci -q get openmptcprouter.$1.ip)" + vpsip="" + [ -n "$1"] && vpsip="$(uci -q get openmptcprouter.$1.ip)" if [ -n "$vpsip" ] && [ "$(omr-routing-loop $vpsip $lanip $OMR_TRACKER_DEVICE)" = "detected" ]; then loop=1 fi @@ -1249,7 +1268,9 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( } if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then if [ -n "$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu)" ]; then - mtu=$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu) + network_device=$(find_network_device ${OMR_TRACKER_INTERFACE}) + mtu="" + [ -n "$network_device" ] && mtu=$(uci -q get network.${network_device}.mtu) [ -n "$mtu" ] && { uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mtu=$mtu ip link set dev $OMR_TRACKER_DEVICE mtu $mtu > /dev/null 2>&1 @@ -1275,7 +1296,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( } config_load openmptcprouter config_foreach traceboxmtutest server - [ "$(uci -q get openmptcprouter.settings.tracebox)" = "0" ] && { + [ "$(uci -q get openmptcprouter.settings.tracebox)" = "0" ] && [ -n "$OMR_TRACKER_DEVICE" ] && { mptcpsupport="$(omr-mptcp-intf $OMR_TRACKER_DEVICE)" [ -n "$mptcpsupport" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mptcp_status="$mptcpsupport" } @@ -1319,7 +1340,8 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( [ -n "$omrtracebox" ] && [ -z "$(echo $omrtracebox | grep error)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mptcp_status="$omrtracebox" } if [ "$OMR_TRACKER_INTERFACE" != "omrvpn" ] && [ "$(uci -q get glorytun.vpn.enable)" != "1" ] && [ "$(uci -q get glorytun-udp.vpn.enable)" != "1" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then - if [ -n "$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu)" ]; then + network_device=$(find_network_device ${OMR_TRACKER_INTERFACE}) + if [ -n "$network_device" ] && [ -n "$(uci -q get network.${network_device}.mtu)" ]; then mtu=$(uci -q get network.$(find_network_device ${OMR_TRACKER_INTERFACE}).mtu) [ -n "$mtu" ] && { uci -q set openmptcprouter.${OMR_TRACKER_INTERFACE}.mtu=$mtu @@ -1390,7 +1412,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( dns_flush fi -[ -n "$OMR_TRACKER_LATENCY" ] && { +[ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_LATENCY" ] && { [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency)" != "" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_previous="$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency)" uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency="$OMR_TRACKER_LATENCY" #[ -z "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max)" ] && uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.latency_max="$OMR_TRACKER_LATENCY" @@ -1399,7 +1421,7 @@ fi masterintf="$(uci -q show openmptcprouter | grep -m 1 multipath=\'master\' | cut -d'.' -f2)" [ -z "$masterintf" ] && masterintf="$(uci -q show network | grep -m 1 multipath=\'master\' | cut -d'.' -f2)" masterlatency="$(uci -q get openmptcprouter.$masterintf.latency | tr -d '\n')" - if [ -z "$masterlatency" ] || [ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]; then + if [ -z "$masterlatency" ] || ([ -n "$masterintf" ] &&[ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]); then masterlatency=1000 fi if [ -n "$masterintf" ] && ([ "$masterlatency" != "" ] || [ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]); then @@ -1560,7 +1582,7 @@ if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(pgrep openmp /etc/init.d/openmptcprouter-vps set_vps_firewall >/dev/null 2>&1 run_fw_include() { - [ "$(uci -q get firewall.$1.reload)" = "0" ] && sh $(uci -q get firewall.$1.path) >/dev/null 2>&1 + [ -n "$1" ] && [ "$(uci -q get firewall.$1.reload)" = "0" ] && sh $(uci -q get firewall.$1.path) >/dev/null 2>&1 } config_load firewall config_foreach run_fw_include include From 95ea617630f750c0364479db6d43dc7d5d521d6d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 9 Feb 2022 20:29:41 +0100 Subject: [PATCH 25/91] Fix configuration for 5.15 --- luci-app-mptcp/luasrc/model/cbi/mptcp.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua index b9e7d0630..08d1307ee 100644 --- a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua +++ b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua @@ -30,7 +30,7 @@ if uname.release:sub(1,4) ~= "5.14" then end o = s:option(ListValue, "mptcp_scheduler", translate("Multipath TCP scheduler")) o:value("default", translate("default")) -if uname.release:sub(1,4) ~= "5.14" then +if uname.release:sub(1,4) ~= "5.15" then o:value("roundrobin", "round-robin") o:value("redundant", "redundant") if uname.release:sub(1,4) ~= "4.14" then @@ -38,7 +38,7 @@ if uname.release:sub(1,4) ~= "5.14" then o:value("ecf", "ECF") end end -if uname.release:sub(1,4) ~= "5.14" then +if uname.release:sub(1,4) ~= "5.15" then o = s:option(Value, "mptcp_syn_retries", translate("Multipath TCP SYN retries")) o.datatype = "uinteger" o.rmempty = false @@ -49,7 +49,7 @@ for cong in string.gmatch(availablecong, "[^%s]+") do o:value(cong, translate(cong)) end -if uname.release:sub(1,4) == "5.14" then +if uname.release:sub(1,4) == "5.15" then o = s:option(Value, "mptcp_subflows", translate("specifies the maximum number of additional subflows allowed for each MPTCP connection")) o.datatype = "uinteger" o.rmempty = false From 565ee665e2689e93fc5514bdda3d0fac1c0fd8b0 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 03:38:27 +0800 Subject: [PATCH 26/91] Revert "Revert "fix"" This reverts commit 50b2d6232e89c75f05c2010d6823e138120d3e71. --- modemmanager/Makefile | 4 +- ...-avoid-0-9-as-shell-globbing-patters.patch | 60 +++++++++++++++++++ 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 570bc9293..1dbccf127 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.2 +PKG_VERSION:=1.18.4 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=374be158ae1c1fb38a29eef1cc3cdf89ff3536b48ff1320d208ab204ea6c5f8a +PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith diff --git a/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch b/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch new file mode 100644 index 000000000..1b919ba2c --- /dev/null +++ b/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch @@ -0,0 +1,60 @@ +From e9f254ba3f923248efffe4fd458dc5e5469e0f73 Mon Sep 17 00:00:00 2001 +From: Aleksander Morgado +Date: Wed, 1 Dec 2021 21:40:00 +0100 +Subject: [PATCH] udev: avoid [0-9]* as shell globbing patterns + +The udev rules expect matches based on shell globbing pattern, not +based on regex. This means that "[0-9]*" doesn't mean "zero or more +digits", it actually means "one digit and zero or more other +characters". + +So, avoid the regex like match, even if it worked for us, because it +didn't mean what we thought it meant, plus, it breaks our custom udev +rules processing logic, in which we convert the input patterns into +real regex expressions. + +See https://bbs.archlinux.org/viewtopic.php?pid=1415916#p1415916 + +While at it, also make sure that the wildcard matching is done +exclusively for prefix and suffix matches, never in the middle of +a string, or our custom rules parser would not match correctly. +--- + plugins/qcom-soc/77-mm-qcom-soc.rules | 8 ++++---- + src/80-mm-candidate.rules | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +--- a/plugins/qcom-soc/77-mm-qcom-soc.rules ++++ b/plugins/qcom-soc/77-mm-qcom-soc.rules +@@ -24,17 +24,17 @@ ENV{ID_MM_QCOM_SOC}="1" + ENV{ID_MM_PHYSDEV_UID}="qcom-soc" + + # port type hints for the rpmsgexport-ed ports +-SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +-SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" ++SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}=="*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" ++SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}!="*_CNTL", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" + + # ignore every other port without explicit hints + SUBSYSTEM=="rpmsg", ENV{ID_MM_PORT_TYPE_QMI}!="1", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}!="1", ENV{ID_MM_PORT_IGNORE}="1" + + # explicitly ignore ports intended for USB tethering (DATA40, DATA40_CNTL) + SUBSYSTEM=="rpmsg", ATTR{name}=="DATA40*", ENV{ID_MM_PORT_IGNORE}="1" +-KERNEL=="rmnet_usb[0-9]*", ENV{ID_MM_PORT_IGNORE}="1" ++KERNEL=="rmnet_usb*", ENV{ID_MM_PORT_IGNORE}="1" + + # flag all rpmsg ports under this plugin as candidate +-KERNEL=="rpmsg[0-9]*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" ++KERNEL=="rpmsg*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" + + LABEL="mm_qcom_soc_end" +--- a/src/80-mm-candidate.rules ++++ b/src/80-mm-candidate.rules +@@ -15,7 +15,7 @@ KERNEL=="rfcomm*", DEVPATH=="*/virtual/* + + SUBSYSTEM=="tty", ENV{ID_MM_CANDIDATE}="1" + SUBSYSTEM=="net", ENV{ID_MM_CANDIDATE}="1" +-KERNEL=="cdc-wdm[0-9]*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" ++KERNEL=="cdc-wdm*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" + + # WWAN subsystem port handling + # - All USB devices ignored for now, only PCI devices expected From 93f186353f129f97a0cd4255f5e2acaf8d902c3b Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 03:38:41 +0800 Subject: [PATCH 27/91] Revert "Revert "update mm"" This reverts commit f0ce784e0eaba96579cb49f4835d54f6e581717a. --- modemmanager/Makefile | 5 ++- modemmanager/files/modemmanager.common | 8 ++--- modemmanager/files/modemmanager.init | 10 +++--- modemmanager/files/modemmanager.proto | 21 +++++------- .../files/usr/sbin/ModemManager-wrapper | 33 ------------------- 5 files changed, 20 insertions(+), 57 deletions(-) mode change 100644 => 100755 modemmanager/files/modemmanager.init delete mode 100755 modemmanager/files/usr/sbin/ModemManager-wrapper diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 1dbccf127..285dc475c 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager PKG_VERSION:=1.18.4 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) -PKG_MAINTAINER:=Nicholas Smith +PKG_MAINTAINER:=Nicholas Smith PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING @@ -98,7 +98,6 @@ define Package/modemmanager/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin - $(INSTALL_BIN) ./files/usr/sbin/ModemManager-wrapper $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin diff --git a/modemmanager/files/modemmanager.common b/modemmanager/files/modemmanager.common index a439179de..b4139abad 100644 --- a/modemmanager/files/modemmanager.common +++ b/modemmanager/files/modemmanager.common @@ -20,7 +20,7 @@ MODEMMANAGER_EVENTS_CACHE="${MODEMMANAGER_RUNDIR}/events.cache" # Common logging mm_log() { - [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && logger -t "ModemManager" "hotplug: $*" + logger -t "ModemManager" "hotplug: $*" } ################################################################################ @@ -39,14 +39,14 @@ mm_find_physdev_sysfs_path() { # avoid infinite loops iterating [ -z "${tmp_path}" ] || [ "${tmp_path}" = "/" ] && return - # for USB devices, the physical device will be that with a idVendor - # and idProduct pair of files + # For USB devices, the physical device will be that with a idVendor + # and idProduct pair of files [ -f "${tmp_path}"/idVendor ] && [ -f "${tmp_path}"/idProduct ] && { tmp_path=$(readlink -f "$tmp_path") echo "${tmp_path}" return } - + # For PCI devices, the physical device will be that with a vendor # and device pair of files [ -f "${tmp_path}"/vendor ] && [ -f "${tmp_path}"/device ] && { diff --git a/modemmanager/files/modemmanager.init b/modemmanager/files/modemmanager.init old mode 100644 new mode 100755 index a3f6c1b12..b3f9f9290 --- a/modemmanager/files/modemmanager.init +++ b/modemmanager/files/modemmanager.init @@ -22,12 +22,14 @@ start_service() { # it starts. # # All these commands need to be executed on every MM start, even after - # procd-triggered respawns, which is why this is wrapped in a startup - # wrapper script called '/usr/sbin/ModemManager-wrapper'. + # procd-triggered respawns, which is why they're all included as instance command # - . /usr/share/ModemManager/modemmanager.common procd_open_instance - procd_set_param command /usr/sbin/ModemManager-wrapper + procd_set_param command sh -c ". /usr/share/ModemManager/modemmanager.common; \ + mkdir -m 0755 -p ${MODEMMANAGER_RUNDIR}; \ + mm_cleanup_interfaces; \ + ( mm_report_events_from_cache ) >/dev/null 2>&1 & \ + /usr/sbin/ModemManager" procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}" procd_set_param pidfile "${MODEMMANAGER_PID_FILE}" procd_close_instance diff --git a/modemmanager/files/modemmanager.proto b/modemmanager/files/modemmanager.proto index 0e050e7b9..d24910b98 100755 --- a/modemmanager/files/modemmanager.proto +++ b/modemmanager/files/modemmanager.proto @@ -197,7 +197,6 @@ modemmanager_connected_method_dhcp_ipv4() { local interface="$1" local wwan="$2" local metric="$3" - local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -223,7 +222,6 @@ modemmanager_connected_method_static_ipv4() { local dns1="$7" local dns2="$8" local metric="$9" - local defaultroute="$10" local mask="" @@ -244,9 +242,8 @@ modemmanager_connected_method_static_ipv4() { proto_set_keep 1 echo "adding IPv4 address ${address}, netmask ${mask}" proto_add_ipv4_address "${address}" "${mask}" - [ -n "${gateway}" ] && [ "${defaultroute}" != 0 ] && { + [ -n "${gateway}" ] && { echo "adding default IPv4 route via ${gateway}" - logger -t "modemmanager.proto" "adding default IPv4 route via ${gateway} ${address}" proto_add_ipv4_route "0.0.0.0" "0" "${gateway}" "${address}" } [ -n "${dns1}" ] && { @@ -265,7 +262,6 @@ modemmanager_connected_method_dhcp_ipv6() { local interface="$1" local wwan="$2" local metric="$3" - local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -292,7 +288,6 @@ modemmanager_connected_method_static_ipv6() { local dns1="$7" local dns2="$8" local metric="$9" - local defaultroute="$10" [ -n "${address}" ] || { proto_notify_error "${interface}" ADDRESS_MISSING @@ -311,7 +306,7 @@ modemmanager_connected_method_static_ipv6() { echo "adding IPv6 address ${address}, prefix ${prefix}" proto_add_ipv6_address "${address}" "128" proto_add_ipv6_prefix "${address}/${prefix}" - [ -n "${gateway}" ] && [ "$defaultroute" != 0 ] && { + [ -n "${gateway}" ] && { echo "adding default IPv6 route via ${gateway}" proto_add_ipv6_route "${gateway}" "128" proto_add_ipv6_route "::0" "0" "${gateway}" "" "" "${address}/${prefix}" @@ -362,9 +357,9 @@ proto_modemmanager_setup() { local device apn allowedauth username password pincode iptype metric signalrate - local address prefix gateway mtu dns1 dns2 defaultroute + local address prefix gateway mtu dns1 dns2 - json_get_vars device apn allowedauth username password pincode iptype metric signalrate defaultroute + json_get_vars device apn allowedauth username password pincode iptype metric signalrate # validate sysfs path given in config [ -n "${device}" ] || { @@ -452,7 +447,7 @@ proto_modemmanager_setup() { echo "IPv4 connection setup required in interface ${interface}: ${bearermethod_ipv4}" case "${bearermethod_ipv4}" in "dhcp") - modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" + modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.address") @@ -461,7 +456,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" + modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" ;; "ppp") modemmanager_connected_method_ppp_ipv4 "${interface}" "${beareriface}" "${username}" "${password}" "${allowedauth}" @@ -479,7 +474,7 @@ proto_modemmanager_setup() { echo "IPv6 connection setup required in interface ${interface}: ${bearermethod_ipv6}" case "${bearermethod_ipv6}" in "dhcp") - modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" + modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.address") @@ -488,7 +483,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" + modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" ;; "ppp") proto_notify_error "${interface}" "unsupported method" diff --git a/modemmanager/files/usr/sbin/ModemManager-wrapper b/modemmanager/files/usr/sbin/ModemManager-wrapper deleted file mode 100755 index 4fd64227f..000000000 --- a/modemmanager/files/usr/sbin/ModemManager-wrapper +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -trap_with_arg() { - func="$1" ; shift - for sig ; do - # shellcheck disable=SC2064 - trap "$func $sig" "$sig" - done -} - -func_trap() { - logger "ModemManager-wrapper[$$]" "Sending signal ${1}..." - kill "-${1}" "$CHILD" 2>/dev/null -} - -main() { - . /usr/share/ModemManager/modemmanager.common - - trap_with_arg func_trap INT TERM KILL - - mkdir -p "${MODEMMANAGER_RUNDIR}" - chmod 0755 "${MODEMMANAGER_RUNDIR}" - mm_cleanup_interfaces - - /usr/sbin/ModemManager "$@" 1>/dev/null 2>/dev/null & - CHILD="$!" - - mm_report_events_from_cache - - wait "$CHILD" -} - -main "$@" From 43865452a526a8b7dffe7aefe3d3e8314d063d39 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 9 Feb 2022 20:38:43 +0100 Subject: [PATCH 28/91] Check var exist on omr-tracker --- omr-tracker/files/bin/omr-tracker | 7 +++++-- omr-tracker/files/etc/init.d/omr-tracker | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index f78571aab..27824791c 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -92,6 +92,7 @@ _post_tracking() { _ping_server() { local servername=$1 + [ -z "$servername" ] && return local disabled=$(uci -q get openmptcprouter.$1.disabled) local device=$2 if [ -n "$device" ] && [ "$disabled" != "1" ]; then @@ -113,6 +114,7 @@ _ping_server() { _httping_server() { local servername=$1 + [ -z "$servername" ] && return local disabled=$(uci -q get openmptcprouter.$1.disabled) local port=$(uci -q get openmptcprouter.$1.port) local device=$2 @@ -135,9 +137,10 @@ _httping_server() { _ping() { local host=$1 + [ -z "$host" ] && return local device=$2 local localip=$3 - if [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "3g" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "qmi" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "ncm" ]; then + if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "3g" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "qmi" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "ncm" ]); then ret=$(ping -I "${device}" \ -w "$OMR_TRACKER_TIMEOUT" \ -c 2 \ @@ -222,7 +225,7 @@ _none() { _restart -OMR_TRACKER_INTERFACE_PROTO="$(uci -q get network.${OMR_TRACKER_INTERFACE_PROTO}.proto)" +OMR_TRACKER_INTERFACE_PROTO="$(uci -q get network.${OMR_TRACKER_INTERFACE}.proto)" OMR_TRACKER_PREV_STATUS="" # main loop while true; do diff --git a/omr-tracker/files/etc/init.d/omr-tracker b/omr-tracker/files/etc/init.d/omr-tracker index 419e2bd05..0f80614ed 100755 --- a/omr-tracker/files/etc/init.d/omr-tracker +++ b/omr-tracker/files/etc/init.d/omr-tracker @@ -48,7 +48,7 @@ _launch_tracker() { case "$1" in loopback|lan*|if0*) return;; esac - + [ -z "$1" ] && return local hosts hosts6 timeout tries interval interval_tries options type enabled wait_test ipv6 proto server_http_test _validate_section "defaults" "defaults" _validate_section "interface" "$1" @@ -152,6 +152,7 @@ _initialize_shadowsocks_tracker() { server=$1 [ -n "$(echo $server | grep sss)" ] || return + [ -z "$server" ] && return #redir_tcp=$(uci -q get shadowsocks-libev.ss_rules.redir_tcp) #config_get tracker_server ss_rules server @@ -199,7 +200,8 @@ _launch_shadowsocks_tracker() { config_get server "$1" server [ "$enabled" = "0" ] || [ "$disabled" = "1" ] || [ -z "$hosts" ] && return - [ -z "$server" ] || [ "$(uci -q get shadowsocks-libev.$server.server)" = "192.168.1.3" ] || [ "$(uci -q get shadowsocks-libev.$server.server)" = "" ] && return + [ -z "$server" ] && return + [ "$(uci -q get shadowsocks-libev.$server.server)" = "192.168.1.3" ] || [ "$(uci -q get shadowsocks-libev.$server.server)" = "" ] && return procd_open_instance # shellcheck disable=SC2086 From 95485133b0e73305725cead1b32b04e8ac51de98 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 03:38:58 +0800 Subject: [PATCH 29/91] Revert "Revert "Revert "update mm""" This reverts commit 93f186353f129f97a0cd4255f5e2acaf8d902c3b. --- modemmanager/Makefile | 5 +-- modemmanager/files/modemmanager.common | 8 ++--- modemmanager/files/modemmanager.init | 10 +++--- modemmanager/files/modemmanager.proto | 21 +++++++----- .../files/usr/sbin/ModemManager-wrapper | 33 +++++++++++++++++++ 5 files changed, 57 insertions(+), 20 deletions(-) mode change 100755 => 100644 modemmanager/files/modemmanager.init create mode 100755 modemmanager/files/usr/sbin/ModemManager-wrapper diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 285dc475c..1dbccf127 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager PKG_VERSION:=1.18.4 -PKG_RELEASE:=$(AUTORELEASE) +PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) -PKG_MAINTAINER:=Nicholas Smith +PKG_MAINTAINER:=Nicholas Smith PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING @@ -98,6 +98,7 @@ define Package/modemmanager/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin + $(INSTALL_BIN) ./files/usr/sbin/ModemManager-wrapper $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin diff --git a/modemmanager/files/modemmanager.common b/modemmanager/files/modemmanager.common index b4139abad..a439179de 100644 --- a/modemmanager/files/modemmanager.common +++ b/modemmanager/files/modemmanager.common @@ -20,7 +20,7 @@ MODEMMANAGER_EVENTS_CACHE="${MODEMMANAGER_RUNDIR}/events.cache" # Common logging mm_log() { - logger -t "ModemManager" "hotplug: $*" + [ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] && logger -t "ModemManager" "hotplug: $*" } ################################################################################ @@ -39,14 +39,14 @@ mm_find_physdev_sysfs_path() { # avoid infinite loops iterating [ -z "${tmp_path}" ] || [ "${tmp_path}" = "/" ] && return - # For USB devices, the physical device will be that with a idVendor - # and idProduct pair of files + # for USB devices, the physical device will be that with a idVendor + # and idProduct pair of files [ -f "${tmp_path}"/idVendor ] && [ -f "${tmp_path}"/idProduct ] && { tmp_path=$(readlink -f "$tmp_path") echo "${tmp_path}" return } - + # For PCI devices, the physical device will be that with a vendor # and device pair of files [ -f "${tmp_path}"/vendor ] && [ -f "${tmp_path}"/device ] && { diff --git a/modemmanager/files/modemmanager.init b/modemmanager/files/modemmanager.init old mode 100755 new mode 100644 index b3f9f9290..a3f6c1b12 --- a/modemmanager/files/modemmanager.init +++ b/modemmanager/files/modemmanager.init @@ -22,14 +22,12 @@ start_service() { # it starts. # # All these commands need to be executed on every MM start, even after - # procd-triggered respawns, which is why they're all included as instance command + # procd-triggered respawns, which is why this is wrapped in a startup + # wrapper script called '/usr/sbin/ModemManager-wrapper'. # + . /usr/share/ModemManager/modemmanager.common procd_open_instance - procd_set_param command sh -c ". /usr/share/ModemManager/modemmanager.common; \ - mkdir -m 0755 -p ${MODEMMANAGER_RUNDIR}; \ - mm_cleanup_interfaces; \ - ( mm_report_events_from_cache ) >/dev/null 2>&1 & \ - /usr/sbin/ModemManager" + procd_set_param command /usr/sbin/ModemManager-wrapper procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}" procd_set_param pidfile "${MODEMMANAGER_PID_FILE}" procd_close_instance diff --git a/modemmanager/files/modemmanager.proto b/modemmanager/files/modemmanager.proto index d24910b98..0e050e7b9 100755 --- a/modemmanager/files/modemmanager.proto +++ b/modemmanager/files/modemmanager.proto @@ -197,6 +197,7 @@ modemmanager_connected_method_dhcp_ipv4() { local interface="$1" local wwan="$2" local metric="$3" + local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -222,6 +223,7 @@ modemmanager_connected_method_static_ipv4() { local dns1="$7" local dns2="$8" local metric="$9" + local defaultroute="$10" local mask="" @@ -242,8 +244,9 @@ modemmanager_connected_method_static_ipv4() { proto_set_keep 1 echo "adding IPv4 address ${address}, netmask ${mask}" proto_add_ipv4_address "${address}" "${mask}" - [ -n "${gateway}" ] && { + [ -n "${gateway}" ] && [ "${defaultroute}" != 0 ] && { echo "adding default IPv4 route via ${gateway}" + logger -t "modemmanager.proto" "adding default IPv4 route via ${gateway} ${address}" proto_add_ipv4_route "0.0.0.0" "0" "${gateway}" "${address}" } [ -n "${dns1}" ] && { @@ -262,6 +265,7 @@ modemmanager_connected_method_dhcp_ipv6() { local interface="$1" local wwan="$2" local metric="$3" + local defaultroute="$4" proto_init_update "${wwan}" 1 proto_set_keep 1 @@ -288,6 +292,7 @@ modemmanager_connected_method_static_ipv6() { local dns1="$7" local dns2="$8" local metric="$9" + local defaultroute="$10" [ -n "${address}" ] || { proto_notify_error "${interface}" ADDRESS_MISSING @@ -306,7 +311,7 @@ modemmanager_connected_method_static_ipv6() { echo "adding IPv6 address ${address}, prefix ${prefix}" proto_add_ipv6_address "${address}" "128" proto_add_ipv6_prefix "${address}/${prefix}" - [ -n "${gateway}" ] && { + [ -n "${gateway}" ] && [ "$defaultroute" != 0 ] && { echo "adding default IPv6 route via ${gateway}" proto_add_ipv6_route "${gateway}" "128" proto_add_ipv6_route "::0" "0" "${gateway}" "" "" "${address}/${prefix}" @@ -357,9 +362,9 @@ proto_modemmanager_setup() { local device apn allowedauth username password pincode iptype metric signalrate - local address prefix gateway mtu dns1 dns2 + local address prefix gateway mtu dns1 dns2 defaultroute - json_get_vars device apn allowedauth username password pincode iptype metric signalrate + json_get_vars device apn allowedauth username password pincode iptype metric signalrate defaultroute # validate sysfs path given in config [ -n "${device}" ] || { @@ -447,7 +452,7 @@ proto_modemmanager_setup() { echo "IPv4 connection setup required in interface ${interface}: ${bearermethod_ipv4}" case "${bearermethod_ipv4}" in "dhcp") - modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" + modemmanager_connected_method_dhcp_ipv4 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.address") @@ -456,7 +461,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv4-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" + modemmanager_connected_method_static_ipv4 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" ;; "ppp") modemmanager_connected_method_ppp_ipv4 "${interface}" "${beareriface}" "${username}" "${password}" "${allowedauth}" @@ -474,7 +479,7 @@ proto_modemmanager_setup() { echo "IPv6 connection setup required in interface ${interface}: ${bearermethod_ipv6}" case "${bearermethod_ipv6}" in "dhcp") - modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" + modemmanager_connected_method_dhcp_ipv6 "${interface}" "${beareriface}" "${metric}" "${defaultroute}" ;; "static") address=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.address") @@ -483,7 +488,7 @@ proto_modemmanager_setup() { mtu=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.mtu") dns1=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[1\]") dns2=$(modemmanager_get_field "${bearerstatus}" "bearer.ipv6-config.dns.value\[2\]") - modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" + modemmanager_connected_method_static_ipv6 "${interface}" "${beareriface}" "${address}" "${prefix}" "${gateway}" "${mtu}" "${dns1}" "${dns2}" "${metric}" "${defaultroute}" ;; "ppp") proto_notify_error "${interface}" "unsupported method" diff --git a/modemmanager/files/usr/sbin/ModemManager-wrapper b/modemmanager/files/usr/sbin/ModemManager-wrapper new file mode 100755 index 000000000..4fd64227f --- /dev/null +++ b/modemmanager/files/usr/sbin/ModemManager-wrapper @@ -0,0 +1,33 @@ +#!/bin/sh + +trap_with_arg() { + func="$1" ; shift + for sig ; do + # shellcheck disable=SC2064 + trap "$func $sig" "$sig" + done +} + +func_trap() { + logger "ModemManager-wrapper[$$]" "Sending signal ${1}..." + kill "-${1}" "$CHILD" 2>/dev/null +} + +main() { + . /usr/share/ModemManager/modemmanager.common + + trap_with_arg func_trap INT TERM KILL + + mkdir -p "${MODEMMANAGER_RUNDIR}" + chmod 0755 "${MODEMMANAGER_RUNDIR}" + mm_cleanup_interfaces + + /usr/sbin/ModemManager "$@" 1>/dev/null 2>/dev/null & + CHILD="$!" + + mm_report_events_from_cache + + wait "$CHILD" +} + +main "$@" From 72f391e5f4855137fa88192684f7f15869901253 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 03:43:34 +0800 Subject: [PATCH 30/91] Update Makefile --- modemmanager/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 1dbccf127..ad21be44d 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -98,7 +98,6 @@ define Package/modemmanager/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin - $(INSTALL_BIN) ./files/usr/sbin/ModemManager-wrapper $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin From fbc17ee1f16bd28b49c7e662a74f08ed706ea720 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Thu, 10 Feb 2022 04:18:38 +0800 Subject: [PATCH 31/91] Update Makefile --- modemmanager/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/modemmanager/Makefile b/modemmanager/Makefile index ad21be44d..1dbccf127 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -98,6 +98,7 @@ define Package/modemmanager/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin + $(INSTALL_BIN) ./files/usr/sbin/ModemManager-wrapper $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin From a3df637e4bd89812727df9349966a856b8736156 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Fri, 11 Feb 2022 01:08:44 +0800 Subject: [PATCH 32/91] Update omr-test-speed --- openmptcprouter/files/bin/omr-test-speed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmptcprouter/files/bin/omr-test-speed b/openmptcprouter/files/bin/omr-test-speed index 71bc4d75c..8bf2a7cab 100755 --- a/openmptcprouter/files/bin/omr-test-speed +++ b/openmptcprouter/files/bin/omr-test-speed @@ -14,7 +14,7 @@ fi } echo "Select best test server..." -HOSTLST="http://scaleway.testdebit.info/10G.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" +HOSTLST="http://scaleway.testdebit.info/10G.iso https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso http://mirrors.163.com/ubuntukylin-cd/20.04/ubuntukylin-20.04-pro-amd64.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" bestping="9999" for pinghost in $HOSTLST; do domain=$(echo $pinghost | awk -F/ '{print $3}') From f9a784cc2184d7157a8e7e459dae92b5fafef7c3 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Fri, 11 Feb 2022 01:17:01 +0800 Subject: [PATCH 33/91] Update omr-test-speed --- openmptcprouter/files/bin/omr-test-speed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmptcprouter/files/bin/omr-test-speed b/openmptcprouter/files/bin/omr-test-speed index 8bf2a7cab..b7bf21496 100755 --- a/openmptcprouter/files/bin/omr-test-speed +++ b/openmptcprouter/files/bin/omr-test-speed @@ -14,7 +14,7 @@ fi } echo "Select best test server..." -HOSTLST="http://scaleway.testdebit.info/10G.iso https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso http://mirrors.163.com/ubuntukylin-cd/20.04/ubuntukylin-20.04-pro-amd64.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" +HOSTLST="http://scaleway.testdebit.info/10G.iso https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso https://mirrors.aliyun.com/ubuntu-releases/impish/ubuntu-21.10-desktop-amd64.iso http://mirrors.163.com/ubuntukylin-cd/20.04/ubuntukylin-20.04-pro-amd64.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" bestping="9999" for pinghost in $HOSTLST; do domain=$(echo $pinghost | awk -F/ '{print $3}') From 5ec30b02c21d626cf45a254fe036154334d95d42 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Fri, 11 Feb 2022 01:23:22 +0800 Subject: [PATCH 34/91] Update omr-test-speed --- openmptcprouter/files/bin/omr-test-speed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmptcprouter/files/bin/omr-test-speed b/openmptcprouter/files/bin/omr-test-speed index b7bf21496..9a5fea6d8 100755 --- a/openmptcprouter/files/bin/omr-test-speed +++ b/openmptcprouter/files/bin/omr-test-speed @@ -14,7 +14,7 @@ fi } echo "Select best test server..." -HOSTLST="http://scaleway.testdebit.info/10G.iso https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso https://mirrors.aliyun.com/ubuntu-releases/impish/ubuntu-21.10-desktop-amd64.iso http://mirrors.163.com/ubuntukylin-cd/20.04/ubuntukylin-20.04-pro-amd64.iso http://bordeaux.testdebit.info/10G.iso http://aix-marseille.testdebit.info/10G.iso http://lyon.testdebit.info/10G.iso http://lille.testdebit.info/10G.iso http://paris.testdebit.info/10G.iso http://appliwave.testdebit.info/10G/10G.iso http://speedtest.frankfurt.linode.com/garbage.php?ckSize=10000 http://speedtest.tokyo2.linode.com/garbage.php?ckSize=10000 http://speedtest.singapore.linode.com/garbage.php?ckSize=10000 http://speedtest.newark.linode.com/garbage.php?ckSize=10000 http://speedtest.atlanta.linode.com/garbage.php?ckSize=10000 http://speedtest.dallas.linode.com/garbage.php?ckSize=10000 http://speedtest.fremont.linode.com/garbage.php?ckSize=10000 https://speed.hetzner.de/10GB.bin http://ipv4.bouygues.testdebit.info/10G.iso http://par.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin http://ams.download.datapacket.com/10000mb.bin http://fra.download.datapacket.com/10000mb.bin http://lon.download.datapacket.com/10000mb.bin http://mad.download.datapacket.com/10000mb.bin http://prg.download.datapacket.com/10000mb.bin http://sto.download.datapacket.com/10000mb.bin http://vie.download.datapacket.com/10000mb.bin http://war.download.datapacket.com/10000mb.bin http://atl.download.datapacket.com/10000mb.bin http://chi.download.datapacket.com/10000mb.bin http://lax.download.datapacket.com/10000mb.bin http://mia.download.datapacket.com/10000mb.bin http://nyc.download.datapacket.com/10000mb.bin" +HOSTLST="https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso https://mirrors.aliyun.com/ubuntu-releases/impish/ubuntu-21.10-desktop-amd64.iso http://mirrors.163.com/ubuntukylin-cd/20.04/ubuntukylin-20.04-pro-amd64.iso https://mirrors.cloud.tencent.com/ubuntu-cdimage/ubuntu/daily-canary/20220209/jammy-desktop-canary-amd64.iso" bestping="9999" for pinghost in $HOSTLST; do domain=$(echo $pinghost | awk -F/ '{print $3}') From cbde0b8a994af7e200fa34dd81869f8def59110b Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Fri, 11 Feb 2022 01:27:41 +0800 Subject: [PATCH 35/91] Update omr-test-speed --- openmptcprouter/files/bin/omr-test-speed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmptcprouter/files/bin/omr-test-speed b/openmptcprouter/files/bin/omr-test-speed index 9a5fea6d8..9817eda79 100755 --- a/openmptcprouter/files/bin/omr-test-speed +++ b/openmptcprouter/files/bin/omr-test-speed @@ -14,7 +14,7 @@ fi } echo "Select best test server..." -HOSTLST="https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso https://mirrors.aliyun.com/ubuntu-releases/impish/ubuntu-21.10-desktop-amd64.iso http://mirrors.163.com/ubuntukylin-cd/20.04/ubuntukylin-20.04-pro-amd64.iso https://mirrors.cloud.tencent.com/ubuntu-cdimage/ubuntu/daily-canary/20220209/jammy-desktop-canary-amd64.iso" +HOSTLST="https://repo.huaweicloud.com/debian-cd/10.0.0/amd64/iso-dvd/debian-10.0.0-amd64-DVD-2.iso https://mirrors.aliyun.com/ubuntu-releases/impish/ubuntu-21.10-desktop-amd64.iso https://mirrors.cloud.tencent.com/ubuntu-cdimage/ubuntu/daily-canary/20220209/jammy-desktop-canary-amd64.iso" bestping="9999" for pinghost in $HOSTLST; do domain=$(echo $pinghost | awk -F/ '{print $3}') From 095a7b0b511f565ad7e15e2710a23a1dc8c99ca4 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 10 Feb 2022 20:37:29 +0100 Subject: [PATCH 36/91] Update iperf3 to 3.11 --- iperf3/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iperf3/Makefile b/iperf3/Makefile index 6cdb6b8a9..cf0d6599c 100644 --- a/iperf3/Makefile +++ b/iperf3/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iperf -PKG_VERSION:=3.10.1 +PKG_VERSION:=3.11 PKG_RELEASE:=10 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://downloads.es.net/pub/iperf -PKG_HASH:=03bc9760cc54a245191d46bfc8edaf8a4750f0e87abca6764486972044d6715a +PKG_SOURCE:=$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/esnet/iperf/archive/refs/tags/ +PKG_HASH:=96e909c0d3ab6034c52328c2954fb3934aaff349395c4bc2611dcd50e6b89875 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause From 1bcfffa39295d15d01db6cca64b6bf48b36bfa7b Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 11 Feb 2022 12:06:41 +0100 Subject: [PATCH 37/91] Add and remove logs on omr-tracker --- .../share/omr/post-tracking.d/post-tracking | 56 +++++++++---------- omr-tracker/files/bin/omr-tracker | 6 +- 2 files changed, 33 insertions(+), 29 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 50fa888b7..0e8ca6953 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -664,7 +664,7 @@ disable_pihole() { commit dhcp EOF fi - /etc/init.d/dnsmasq restart + /etc/init.d/dnsmasq restart 2>&1 >/dev/null fi } @@ -746,7 +746,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then commit openvpn EOF fi - /etc/init.d/openvpn restart $VPN_BASE_INTF + /etc/init.d/openvpn restart $VPN_BASE_INTF 2>&1 >/dev/null fi config_load openmptcprouter config_foreach del_server_route server @@ -824,25 +824,25 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then _log "Tunnel down use ShadowSocks for UDP" uci -q set shadowsocks-libev.ss_rules.redir_udp='hi1' if /etc/init.d/shadowsocks-libev rules_exist ; then - /etc/init.d/shadowsocks-libev rules_down - /etc/init.d/shadowsocks-libev rules_up + /etc/init.d/shadowsocks-libev rules_down 2>&1 >/dev/null + /etc/init.d/shadowsocks-libev rules_up 2>&1 >/dev/null fi fi if [ "$(uci -q get dsvpn.vpn.enable)" = "1" ]; then _log "DSVPN down, restart it" - /etc/init.d/dsvpn restart + /etc/init.d/dsvpn restart 2>&1 >/dev/null fi if [ "$(uci -q get mlvpn.general.enable)" = "1" ]; then _log "MLVPN down, restart it" - /etc/init.d/mlvpn restart + /etc/init.d/mlvpn restart 2>&1 >/dev/null fi if [ "$(uci -q get glorytun.vpn.enable)" = "1" ]; then _log "Glorytun VPN down, restart it" - /etc/init.d/glorytun restart + /etc/init.d/glorytun restart 2>&1 >/dev/null fi if [ "$(uci -q get glorytun-udp.vpn.enable)" = "1" ]; then _log "Glorytun UDP VPN down, restart it" - /etc/init.d/glorytun-udp restart + /etc/init.d/glorytun-udp restart 2>&1 >/dev/null fi config_load openmptcprouter config_foreach disable_pihole server @@ -935,7 +935,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om config_load openmptcprouter config_foreach enable_pihole server #config_foreach delete_server_default_route server - [ "$nbserver" = "$piholeenabled" ] && /etc/init.d/openmptcprouter-vps set_pihole + [ "$nbserver" = "$piholeenabled" ] && /etc/init.d/openmptcprouter-vps set_pihole 2>&1 >/dev/null #ubus call network reload exit 0 fi @@ -1219,7 +1219,7 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRAC _log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ipaddr" /etc/init.d/mptcp enabled && { _log "Reload MPTCP for $OMR_TRACKER_DEVICE" - /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" >/dev/null + /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" 2>&1 >/dev/null } uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ipaddr" } @@ -1323,7 +1323,7 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRAC _log "New public ip detected for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE): $ip6addr" /etc/init.d/mptcp enabled && { _log "Reload MPTCP for $OMR_TRACKER_DEVICE" - /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" >/dev/null + /etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE" 2>&1 >/dev/null } uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.publicip="$ip6addr" } @@ -1421,7 +1421,7 @@ fi masterintf="$(uci -q show openmptcprouter | grep -m 1 multipath=\'master\' | cut -d'.' -f2)" [ -z "$masterintf" ] && masterintf="$(uci -q show network | grep -m 1 multipath=\'master\' | cut -d'.' -f2)" masterlatency="$(uci -q get openmptcprouter.$masterintf.latency | tr -d '\n')" - if [ -z "$masterlatency" ] || ([ -n "$masterintf" ] &&[ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]); then + if [ -z "$masterlatency" ] || ([ -n "$masterintf" ] && [ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]); then masterlatency=1000 fi if [ -n "$masterintf" ] && ([ "$masterlatency" != "" ] || [ "$(uci -q get openmptcprouter.$masterintf.state)" = "down" ]); then @@ -1449,22 +1449,22 @@ fi # If a service is down, force restart it if [ "$(pgrep ss-redir)" = "" ] && [ "$(pgrep ss-local)" = "" ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "192.18.1.3" ] && [ "$(uci -q get shadowsocks-libev.sss0.key)" != "" ]; then _log "Can't find Shadowsocks, restart it..." - /etc/init.d/shadowsocks-libev restart + /etc/init.d/shadowsocks-libev restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep glorytun)" = "" ] && [ "$(uci -q get glorytun.vpn.enable)" = "1" ] && [ -f /etc/init.d/glorytun ] && [ "$(uci -q get glorytun.vpn.key)" != "" ]; then _log "Can't find Glorytun, restart it..." - /etc/init.d/glorytun restart + /etc/init.d/glorytun restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep glorytun-udp)" = "" ] && [ "$(uci -q get glorytun-usp.vpn.enable)" = "1" ] && [ -f /etc/init.d/glorytun-udp ] && [ "$(uci -q get glorytun-udp.vpn.key)" != "" ]; then _log "Can't find Glorytun UDP, restart it..." - /etc/init.d/glorytun-udp restart + /etc/init.d/glorytun-udp restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep unbound)" = "" ] && [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" = "1" ]; then - /etc/init.d/unbound restart + /etc/init.d/unbound restart 2>&1 >/dev/null sleep 5 fi @@ -1477,53 +1477,53 @@ if [ "$(pgrep openvpn)" = "" ] && [ -f /etc/init.d/openvpn ]; then config_foreach openvpn_enabled openvpn if [ "$openvpn_enable" = "1" ]; then _log "Can't find OpenVPN, restart it" - /etc/init.d/openvpn restart + /etc/init.d/openvpn restart 2>&1 >/dev/null sleep 5 fi fi if [ "$(pgrep mlvpn)" = "" ] && [ "$(uci -q get mlvpn.general.enable)" = "1" ] && [ -f /etc/init.d/mlvpn ] && [ "$(uci -q get mlvpn.general.password)" != "" ]; then _log "Can't find MLVPN, restart it..." - /etc/init.d/mlvpn restart + /etc/init.d/mlvpn restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep dsvpn)" = "" ] && [ "$(uci -q get dsvpn.vpn.enable)" = "1" ] && [ -f /etc/init.d/dsvpn ] && [ "$(uci -q get dsvpn.vpn.key)" != "" ]; then _log "Can't find DSVPN, restart it..." - /etc/init.d/dsvpn restart + /etc/init.d/dsvpn restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep v2ray)" = "" ] && [ "$(uci -q get v2ray.main.enabled)" = "1" ] && [ -f /etc/init.d/v2ray ]; then _log "Can't find V2Ray, restart it..." - /etc/init.d/v2ray restart + /etc/init.d/v2ray restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep miniupnpd)" = "" ] && [ "$(uci -q get upnpd.config.enabled)" = "1" ] && [ -f /etc/init.d/miniupnpd ]; then _log "Can't find miniupnpd, restart it..." - /etc/init.d/miniupnpd restart + /etc/init.d/miniupnpd restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep rpcd)" = "" ] && [ -f /etc/init.d/rpcd ]; then _log "Can't find rpcd, restart it..." - /etc/init.d/rpcd restart + /etc/init.d/rpcd restart 2>&1 >/dev/null sleep 5 fi if [ "$(pgrep uhttpd)" = "" ] && [ -f /etc/init.d/uhttpd ]; then _log "Can't find uhttpd, restart it..." - /etc/init.d/uhttpd restart + /etc/init.d/uhttpd restart 2>&1 >/dev/null sleep 5 fi #if [ "$(pgrep ModemManager)" = "" ] && [ -f /etc/init.d/modemmanager ] && [ -n "$(uci -q show network | grep modemmanager)" ] && [ "$(uci -q get openmptcprouter.settings.modemmanager)" != "0" ]; then # _log "Can't find ModemManager, restart it..." -# /etc/init.d/modemmanager restart +# /etc/init.d/modemmanager restart 2>&1 >/dev/null # sleep 5 #fi if [ "$(uci -q get v2ray.main.enabled)" = "1" ] && [ -f /etc/init.d/v2ray ] && [ "$(pgrep -f omr-tracker-v2ray)" = "" ] && [ "$(pgrep -f '/etc/init.d/omr-tracker')" = "" ]; then _log "Can't find omr-tracker-v2ray, restart omr-tracker..." - /etc/init.d/omr-tracker restart + /etc/init.d/omr-tracker restart 2>&1 >/dev/null fi set_get_config() { @@ -1539,7 +1539,7 @@ fi if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.key)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "192.18.1.3" ] && [ "$(pgrep -f omr-tracker-ss)" = "" ] && [ "$(pgrep -f '/etc/init.d/omr-tracker')" = "" ]; then _log "Can't find omr-tracker-ss, restart omr-tracker..." - /etc/init.d/omr-tracker restart + /etc/init.d/omr-tracker restart 2>&1 >/dev/null fi if [ "$(uci -q get glorytun.vpn.enable)" = "1" ] && [ "$(uci -q get glorytun.vpn.key)" = "" ]; then @@ -1563,12 +1563,12 @@ fi if [ "$(iptables-save | grep omr-bypass)" = "" ] && [ "$(pgrep omr-bypass)" = "" ]; then _log "Can't find omr-bypass rules, restart omr-bypass..." - /etc/init.d/omr-bypass + /etc/init.d/omr-bypass 2>&1 >/dev/null fi if [ -f /etc/backup/installed_packages.txt ]; then _log "Reinstall packages..." - /etc/init.d/sysupgrade restart + /etc/init.d/sysupgrade restart 2>&1 >/dev/null fi if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]); then diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index 27824791c..0799c90ce 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -85,7 +85,11 @@ _post_tracking() { _log() { logger -t "post-tracking-${tracker_bin##*/}" "$*" } - . "$tracker_bin" + tmp=$(mktemp) + . "$tracker_bin" 2>&1 > "$tmp" + trackresult=$(< "$tmp") + [ -n "$trackresult" ] && _log $trackresult + rm -f "$tmp" ) done } From a3131ab8b04bcf74103aa33f08cf1a25cfce9497 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 11 Feb 2022 12:07:14 +0100 Subject: [PATCH 38/91] Update ndpi-netfilter2 and add host to bypass only if not already here --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 9 +++++++-- ndpi-netfilter2/Makefile | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) 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 57d81c923..5220f47e2 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -14,13 +14,18 @@ _add_proto() { if [ "$(dd if=/proc/net/xt_ndpi/proto bs=4096 2> /dev/null | grep $protoname)" = "" ]; then echo "add_custom $protoname" >/proc/net/xt_ndpi/proto fi + allurls="$(dd if=/proc/net/xt_ndpi/host_proto bs=4096 2> /dev/null)" hosts="$( uci -q get omr-bypass.$protoname.url )" for url in $hosts; do - echo "$protoname:$url" >/proc/net/xt_ndpi/host_proto + if [ "$(echo "$allurls" | grep -i ^${protoname}: | grep $url)" = "" ]; then + echo "$protoname:$url" >/proc/net/xt_ndpi/host_proto + fi done ip="$( uci -q get omr-bypass.$protoname.ip )" for ip in $ips; do - echo "$protoname:$ip" >/proc/net/xt_ndpi/ip_proto + if [ "$(echo "$allurls" | grep -i ^${protoname}: | grep $ip)" = "" ]; then + echo "$protoname:$ip" >/proc/net/xt_ndpi/ip_proto + fi done } diff --git a/ndpi-netfilter2/Makefile b/ndpi-netfilter2/Makefile index b74ed75c1..2c0377aa8 100644 --- a/ndpi-netfilter2/Makefile +++ b/ndpi-netfilter2/Makefile @@ -11,8 +11,8 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ndpi-netfilter2 PKG_RELEASE:=3 -PKG_REV:=25a5c2e1d619aa2d819b18bed8276b3bd7eb4c5b -PKG_VERSION:=3.2-$(PKG_REV) +PKG_REV:=59f295ba86110f2642f76eb967b041c4108fedd5 +PKG_VERSION:=4-$(PKG_REV) PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 From 57e413c334f2a555a603d31bcd41cdd39ec6ed39 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sun, 13 Feb 2022 10:55:18 +0100 Subject: [PATCH 39/91] Fix script, keep device --- luci-app-openmptcprouter/root/etc/init.d/openmptcprouter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter index 452749803..928feb60f 100755 --- a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter +++ b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter @@ -39,7 +39,7 @@ omr_intf_set() { uci -q set network.$1.modalias="$(cat /sys/class/net/${ifname}/device/uevent | grep MODALIAS | cut -d '=' -f2 | tr -d '\n')-$mac" uci -q set network.$1.product="$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT | cut -d '=' -f2 | tr -d '\n')" elif [ -n "$devicepath" ] && ([ "$(echo ${devicepath} | grep virtual)" != "" ] || [ "$(echo ${devicepath} | grep virtual)" = "" ] && [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT)" = "" ] || [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PCI_SLOT_NAME)" != "" ] || [ "$(cat /sys/class/net/${ifname}tmp/device/uevent)" != "" ]); then - uci -q delete network.$1.device + #uci -q delete network.$1.device uci -q delete network.$1.modalias uci -q delete network.$1.product fi From cd38c1a7e8a9b46e1669cef00eaef6d18e275555 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 15 Feb 2022 20:46:46 +0100 Subject: [PATCH 40/91] Fix ifname to device in wizard --- luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index f2c85d3e9..dafe89a3d 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -11,7 +11,7 @@ function device_notvirtual(dev) for _, iface in ipairs(net:get_networks()) do local ifacen = iface:name() - local ifacename = uci:get("network",ifacen,"ifname") + local ifacename = uci:get("network",ifacen,"device") local ifacetype = uci:get("network",ifacen,"type") or "" local ifaceproto = uci:get("network",ifacen,"proto") or "" --if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then From 0395613d5fb18b4d166473cc2aac10f3aadd2a24 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 15 Feb 2022 20:47:08 +0100 Subject: [PATCH 41/91] Fix macvlan --- macvlan/files/etc/init.d/macvlan | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/macvlan/files/etc/init.d/macvlan b/macvlan/files/etc/init.d/macvlan index a09988504..6669a9ff2 100755 --- a/macvlan/files/etc/init.d/macvlan +++ b/macvlan/files/etc/init.d/macvlan @@ -13,6 +13,7 @@ _save_macaddr() { local _macaddr uci -q get "network.$1_dev.ifname" >/dev/null && { _ifname=$(uci -q get "network.$1.ifname") + [ -z "$_ifname" ] && _ifname=$(uci -q get "network.$1.device") if [ -n "$(uci -q get network.$1.macaddr)" ] && [ "$(uci -q get network.$1.macaddr)" != "$(uci -q get network.$1_dev.macaddr)" ]; then uci -q set network.$1_dev.macaddr="$(uci -q get network.$1.macaddr)" else @@ -25,6 +26,7 @@ _save_macaddr() { } [ -z "$(uci -q get network.$1.macaddr)" ] && { _ifname=$(uci -q get "network.$1.ifname") + [ -z "$_ifname" ] && _ifname=$(uci -q get "network.$1.device") [ -n "$_ifname" ] && [ -z "$(echo $_ifname | grep '\.')" ] && { _macaddr=$(ip link show dev $_ifname 2>/dev/null | grep link | awk '{print $2}') [ -n "$_macaddr" ] && { @@ -42,8 +44,6 @@ _delete_device() { uci -q batch <<-EOF delete network.$1 commit network - delete macvlan.$1 - commit macvlan EOF } return @@ -67,7 +67,7 @@ _setup_interface() { [ -z "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1.masterintf=$(uci -q get network.$1_dev.ifname) [ -n "$(uci -q get network.$1.masterintf)" ] && uci -q set network.$1_dev.ifname=$(uci -q get network.$1.masterintf) [ -n "$(uci -q get network.$1.macaddr)" ] && uci -q set network.$1_dev.macaddr=$(uci -q get network.$1.macaddr) - uci set network.$1.ifname=$1 + uci set network.$1.device=$1 uci -q commit network return 0 } @@ -75,9 +75,11 @@ _setup_interface() { uci -q batch <<-EOF set network.$1_dev=device set network.$1_dev.name=$1 - set network.$1_dev.type=macvlan + set network.$1_dev.type='macvlan' set network.$1_dev.ifname=$_ifname - set network.$1.ifname=$1 + set network.$1_dev.mode='private' + set network.$1_dev.multicast=0 + set network.$1.device=$1 set network.$1.masterintf=$_ifname set network.$1.type=macvlan set network.$1.defaultroute=0 @@ -86,7 +88,7 @@ _setup_interface() { #_macaddr=$(uci -q get "network.$1.macaddr") #_setup_macaddr "$1" "${_macaddr:-auto$(date +%s)}" - _setup_macaddr "$1" "auto$(date +%s)" + _setup_macaddr "$1" "$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')" uci -q set network.$1_dev.mtu=$(uci -q get network.$1.mtu) uci -q commit network } From 57108e16608c9624892d499132ccb6061c33103b Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 15 Feb 2022 20:47:28 +0100 Subject: [PATCH 42/91] Fix set mac address --- openmptcprouter/files/etc/uci-defaults/1920-omr-network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index ef722926a..c8be3490a 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -27,7 +27,7 @@ _setup_macvlan() { set network.$1.masterintf=$_ifname EOF _macaddr=$(uci -q get "network.$1.macaddr") - _setup_macaddr "$1_dev" "${_macaddr:-auto$(date +%s)}" + _setup_macaddr "$1_dev" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" } #_setup_macvlan_update() { From 03802f5b4711038c86b1da3b71ea4aceb653fa2a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 17 Feb 2022 13:21:36 +0100 Subject: [PATCH 43/91] Use listvalue for protocol/services in omr-bypass --- .../htdocs/luci-static/resources/view/services/omr-bypass.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js b/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js index 109279953..361d203db 100644 --- a/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js +++ b/luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js @@ -190,7 +190,7 @@ return L.view.extend({ o = s.option(form.Flag, 'enabled', _('Enabled')); o.default = o.enabled; - o = s.option(form.Value, 'proto', _('Protocol/Service')); + o = s.option(form.ListValue, 'proto', _('Protocol/Service')); o.rmempty = false; o.load = function(section_id) { return Promise.all([ From 5d38d60559728fd7a1af7ca1035a5b46ef8376ef Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 18 Feb 2022 08:28:39 +0100 Subject: [PATCH 44/91] Add Multipath version support --- luci-app-mptcp/luasrc/model/cbi/mptcp.lua | 6 ++++++ mptcp/files/etc/init.d/mptcp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua index 08d1307ee..d853e8e49 100644 --- a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua +++ b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua @@ -43,6 +43,12 @@ if uname.release:sub(1,4) ~= "5.15" then o.datatype = "uinteger" o.rmempty = false end +if uname.release:sub(1,4) ~= "5.15" then + o = s:option(Value, "mptcp_version", translate("Multipath TCP version")) + o.datatype = "uinteger" + o.rmempty = false + o.default = 0 +end o = s:option(ListValue, "congestion", translate("Congestion Control"),translate("Default is cubic")) local availablecong = sys.exec("sysctl -n net.ipv4.tcp_available_congestion_control | xargs -n1 | sort | xargs") for cong in string.gmatch(availablecong, "[^%s]+") do diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index d7646364d..9eb53107a 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -28,6 +28,7 @@ global_multipath_settings() { config_get mptcp_ndiffports_num_subflows globals mptcp_ndiffports_num_subflows config_get mptcp_rr_cwnd_limited globals mptcp_rr_cwnd_limited config_get mptcp_rr_num_segments globals mptcp_rr_num_segments + config_get mptcp_version globals mptcp_version "0" [ "$multipath" = "enable" ] && multipath_status=1 @@ -44,6 +45,7 @@ global_multipath_settings() { [ -z "$mptcp_ndiffports_num_subflows" ] || sysctl -qew /sys/module/mptcp_ndiffports/parameters/num_subflows="$mptcp_ndiffports_num_subflows" [ -z "$mptcp_rr_cwnd_limited" ] || sysctl -qew /sys/module/mptcp_rr/parameters/cwnd_limited="$mptcp_rr_cwnd_limited" [ -z "$mptcp_rr_num_segments" ] || sysctl -qew /sys/module/mptcp_rr/parameters/num_segments="$mptcp_rr_num_segments" + [ -z "$mptcp_version" ] || sysctl -qew net.mptcp.mptcp_version="$mptcp_version" elif [ -f /proc/sys/net/mptcp/enabled ]; then sysctl -qew net.mptcp.enabled="$multipath_status" ip mptcp limits set add_addr_accepted $mptcp_add_addr_accepted subflows $mptcp_subflows 2>&1 >/dev/null @@ -257,6 +259,7 @@ interface_multipath_settings() { else #echo "Add routes for $ipaddr table $id" [ -n "$ipaddr" ] && ip rule add from $ipaddr table $id pref 0 + ip rule add oif $iface table $id pref 0 ip route replace $network/$netmask dev $iface scope link metric $id 2>&1 >/dev/null ip route replace $network/$netmask dev $iface scope link table $id 2>&1 >/dev/null ip route replace default via $gateway dev $iface table $id 2>&1 >/dev/null @@ -343,6 +346,7 @@ interface_multipath_settings() { EOF else [ -n "$ip6addr" ] && ip -6 rule add from $ip6addr table 6$id pref 0 2>&1 >/dev/null + ip rule add oif $iface table 6$id pref 0 ip -6 route replace $network6/$netmask6 dev $iface scope link metric 6$id 2>&1 >/dev/null ip -6 route replace $network6/$netmask6 dev $iface scope link table 6$id 2>&1 >/dev/null ip -6 route replace default via $gateway6 dev $iface table 6$id 2>&1 >/dev/null From cb7c547b00fdf6cf6bacc149683df705c0995c32 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 18 Feb 2022 08:29:08 +0100 Subject: [PATCH 45/91] Redirect error for sysupgrade --- luci-app-sysupgrade/root/etc/init.d/sysupgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-sysupgrade/root/etc/init.d/sysupgrade b/luci-app-sysupgrade/root/etc/init.d/sysupgrade index 377c67944..9ffc3c537 100755 --- a/luci-app-sysupgrade/root/etc/init.d/sysupgrade +++ b/luci-app-sysupgrade/root/etc/init.d/sysupgrade @@ -11,7 +11,7 @@ start_service() { if [ -f /etc/backup/installed_packages.txt ]; then - if [ "$(opkg -V0 update)" = "" ]; then + if [ "$(opkg -V0 update 2>&1)" = "" ]; then grep "\toverlay" /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg -V0 install rm /etc/backup/installed_packages.txt fi From 275c61de5021f978814fe34a0fb1689da023b62e Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 18 Feb 2022 14:10:45 +0100 Subject: [PATCH 46/91] Fix stupid error for ipv6 --- omr-6in4/files/etc/init.d/omr-6in4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omr-6in4/files/etc/init.d/omr-6in4 b/omr-6in4/files/etc/init.d/omr-6in4 index 5bec94c02..8a3e38a38 100755 --- a/omr-6in4/files/etc/init.d/omr-6in4 +++ b/omr-6in4/files/etc/init.d/omr-6in4 @@ -73,7 +73,7 @@ set_ipv6_state() { unbound.ub_main.protocol='mixed' commit unbound EOF - if [ "$(network.lan.ip6assign)" = "" ]; then + if [ "$(uci -q get network.lan.ip6assign)" = "" ]; then uci -q set network.lan.ip6assign='60' fi if [ "$(uci -q get network.globals.ula_prefix)" = "" ]; then From 1b3fc8b4a2b9d55e36034e1ea44bb0dbdcddd4a2 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 9 Jul 2021 11:17:58 +0000 Subject: [PATCH 47/91] Translated using Weblate (French) Currently translated at 100.0% (287 of 287 strings) Translation: OpenMPTCProuter/LuCI/applications/openmptcprouter Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsopenmptcprouter/fr/ --- luci-app-openmptcprouter/po/fr/openmptcprouter.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/po/fr/openmptcprouter.po b/luci-app-openmptcprouter/po/fr/openmptcprouter.po index 001127345..5e5a8d056 100644 --- a/luci-app-openmptcprouter/po/fr/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/fr/openmptcprouter.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-06-01 06:35+0000\n" +"PO-Revision-Date: 2021-07-10 11:51+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -87,7 +87,7 @@ msgstr "Type d'authentification" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:873 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:889 msgid "Backup" -msgstr "Sauvegarder" +msgstr "Remplaçant" #: luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua:21 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm:10 From 68b7d0f6d555394b2dc2376a605cad3715cd4cf5 Mon Sep 17 00:00:00 2001 From: antrouter Date: Mon, 10 Jan 2022 10:09:49 +0000 Subject: [PATCH 48/91] Translated using Weblate (Chinese (Simplified)) Currently translated at 100.0% (287 of 287 strings) Translation: OpenMPTCProuter/LuCI/applications/openmptcprouter Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsopenmptcprouter/zh_Hans/ --- luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po b/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po index e8827e0ff..7bcec9785 100644 --- a/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-06-02 09:51+0000\n" +"PO-Revision-Date: 2022-01-11 10:52+0000\n" "Last-Translator: antrouter \n" "Language-Team: Chinese (Simplified) \n" @@ -113,7 +113,7 @@ msgstr "默认情况下,VPN用于非TCP的任何流量." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:221 msgid "" "By default proxy is used for any traffic that is TCP (and UDP for V2Ray)." -msgstr "默认情况下,代理用于任何TCP(对于V2Ray是UDP)流量。" +msgstr "默认情况下,仅代理TCP(如果选用V2Ray则代理TCP跟UDP还有ICMP任何)流量。" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:840 msgid "CHAP" @@ -946,9 +946,7 @@ msgstr "将服务器设置为主服务器" msgid "" "Set the default Proxy used for TCP when ShadowSocks is enabled, for TCP and " "UDP when V2Ray is enabled." -msgstr "" -"设置启用ShadowSocks时用于TCP的默认代理,启用V2Ray时设置用于TCP和UDP的默认代" -"理." +msgstr "启用ShadowSocks时用于默认代理TC流量,启用V2Ray时用于默认代理TCP和UDP还有ICMP任何流量." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:384 msgid "" @@ -1098,7 +1096,7 @@ msgstr "V2Ray没有运行" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:254 msgid "V2Ray is used for TCP and UDP." -msgstr "V2Ray用于TCP和UDP传输." +msgstr "V2Ray用于TCP和UDP代理." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:251 msgid "V2Ray user" From 7c1298438973f649890337a4918f767841fc330d Mon Sep 17 00:00:00 2001 From: Riccardo Tornesello Date: Thu, 10 Feb 2022 13:22:11 +0000 Subject: [PATCH 49/91] Translated using Weblate (Italian) Currently translated at 16.1% (5 of 31 strings) Translation: OpenMPTCProuter/LuCI/applications/omr-tracker Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsomr-tracker/it/ --- luci-app-omr-tracker/po/it/omr-tracker.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luci-app-omr-tracker/po/it/omr-tracker.po b/luci-app-omr-tracker/po/it/omr-tracker.po index 4257d56b1..eed54997d 100644 --- a/luci-app-omr-tracker/po/it/omr-tracker.po +++ b/luci-app-omr-tracker/po/it/omr-tracker.po @@ -1,18 +1,18 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-09-21 12:51+0000\n" -"Last-Translator: Weblate Admin \n" +"PO-Revision-Date: 2022-02-11 13:53+0000\n" +"Last-Translator: Riccardo Tornesello \n" "Language-Team: Italian \n" "Language: it\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-tracker/luasrc/view/omr-tracker/cbi-select-add.htm:8 msgid "Add" -msgstr "" +msgstr "Aggiungi" #: luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua:117 #: luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua:192 From 694505d82f63be0964407c2922829d3a0fa3df8b Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:24:09 +0000 Subject: [PATCH 50/91] Translated using Weblate (French) Currently translated at 100.0% (287 of 287 strings) Translation: OpenMPTCProuter/LuCI/applications/openmptcprouter Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsopenmptcprouter/fr/ --- luci-app-openmptcprouter/po/fr/openmptcprouter.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/po/fr/openmptcprouter.po b/luci-app-openmptcprouter/po/fr/openmptcprouter.po index 5e5a8d056..5f1b0670d 100644 --- a/luci-app-openmptcprouter/po/fr/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/fr/openmptcprouter.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-07-10 11:51+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -112,7 +112,7 @@ msgstr "Passerelle" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:618 msgid "Bridge can't have multipath enabled" -msgstr "Un pont ne peut avoir multipath d'activer" +msgstr "Les passerelles ne peuvent pas utiliser le protocole multipath" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:287 msgid "By default VPN is used for any traffic that is not TCP." From caac50e2e5644c0b778f3024da825b39b7380375 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:25:11 +0000 Subject: [PATCH 51/91] Translated using Weblate (French) Currently translated at 100.0% (20 of 20 strings) Translation: OpenMPTCProuter/LuCI/applications/iperf Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsiperf/fr/ --- luci-app-iperf/po/fr/iperf.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-iperf/po/fr/iperf.po b/luci-app-iperf/po/fr/iperf.po index 6057249da..711692095 100644 --- a/luci-app-iperf/po/fr/iperf.po +++ b/luci-app-iperf/po/fr/iperf.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-05-21 19:20+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -74,7 +74,7 @@ msgstr "Vitesse souhaitée (Mbits/s)" #: luci-app-iperf/luasrc/view/iperf/test.htm:169 msgid "Test" -msgstr "Teste" +msgstr "Essai" #: luci-app-iperf/luasrc/view/iperf/test.htm:100 msgid "This iPerf interface is in bêta. No support for this." From b1648820cd0a6269db15a7292481fd0d6152fd54 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:25:11 +0000 Subject: [PATCH 52/91] Translated using Weblate (French) Currently translated at 100.0% (54 of 54 strings) Translation: OpenMPTCProuter/LuCI/applications/mptcp Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsmptcp/fr/ --- luci-app-mptcp/po/fr/mptcp.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/luci-app-mptcp/po/fr/mptcp.po b/luci-app-mptcp/po/fr/mptcp.po index 146ec4466..0901267ce 100644 --- a/luci-app-mptcp/po/fr/mptcp.po +++ b/luci-app-mptcp/po/fr/mptcp.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:775 msgid "(%d minute window, %d second interval)" @@ -44,7 +44,7 @@ msgstr "Contrôle de la congestion" #: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69 msgid "Consecutive segments that should be sent for round robin" -msgstr "" +msgstr "Segments consécutifs à envoyer pour round robin" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:311 #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:314 @@ -77,7 +77,7 @@ msgstr "Connexions établies" #: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63 msgid "Fill the congestion window on all subflows for round robin" -msgstr "" +msgstr "Remplir la fenêtre de congestion de tous les sous-flux pour round robin" #: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46 msgid "Fullmesh subflows for each pair of IP addresses" @@ -215,7 +215,7 @@ msgstr "Paramètres" #: luci-app-mptcp/luasrc/view/mptcp/mptcp_check.htm:65 msgid "Test" -msgstr "" +msgstr "Essai" #: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914 msgid "Upload:" From 70cbf743f038ef74c668b5ac86ebbd0e9f8df7df Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:23:28 +0000 Subject: [PATCH 53/91] Translated using Weblate (French) Currently translated at 100.0% (23 of 23 strings) Translation: OpenMPTCProuter/LuCI/applications/omr-bypass Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsomr-bypass/fr/ --- luci-app-omr-bypass/po/fr/omr-bypass.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-omr-bypass/po/fr/omr-bypass.po b/luci-app-omr-bypass/po/fr/omr-bypass.po index 272fe4b31..0e9543bdf 100644 --- a/luci-app-omr-bypass/po/fr/omr-bypass.po +++ b/luci-app-omr-bypass/po/fr/omr-bypass.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:166 #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:174 @@ -94,7 +94,7 @@ msgstr "Ports de destination" #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:90 msgid "Ports source" -msgstr "" +msgstr "Ports source" #: luci-app-omr-bypass/htdocs/luci-static/resources/view/services/omr-bypass.js:193 msgid "Protocol/Service" From d82263d5ca01d8939d3724e4797e365725741472 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:24:17 +0000 Subject: [PATCH 54/91] Translated using Weblate (French) Currently translated at 100.0% (34 of 34 strings) Translation: OpenMPTCProuter/LuCI/applications/omr-dscp Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsomr-dscp/fr/ --- luci-app-omr-dscp/po/fr/omr-dscp.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/luci-app-omr-dscp/po/fr/omr-dscp.po b/luci-app-omr-dscp/po/fr/omr-dscp.po index 8ab04ac95..a7389d8f3 100644 --- a/luci-app-omr-dscp/po/fr/omr-dscp.po +++ b/luci-app-omr-dscp/po/fr/omr-dscp.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-03-31 15:07+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:21 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:73 @@ -36,15 +36,15 @@ msgstr "CS3 - SIP" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:25 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:77 msgid "CS4 - Real-Time Interactive" -msgstr "" +msgstr "CS4 - Temps réel interactif" #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:78 msgid "CS5 - Broadcast Video" -msgstr "" +msgstr "CS5 - Diffusion vidéo" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:26 msgid "CS5 - Broadcast video" -msgstr "" +msgstr "CS5 - Diffusion vidéo" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:27 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:79 @@ -54,7 +54,7 @@ msgstr "CS6 - Routage réseau" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:28 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:80 msgid "CS7 - Latency sensitive" -msgstr "" +msgstr "CS7 - Sensible à la latence" #: luci-app-omr-dscp/luasrc/model/cbi/dscp-domains.lua:20 #: luci-app-omr-dscp/luasrc/model/cbi/dscp.lua:72 @@ -116,7 +116,7 @@ msgstr "EF - Voix" #: luci-app-omr-dscp/root/usr/share/rpcd/acl.d/luci-app-omr-dscp.json:3 msgid "Grant UCI access for luci-app-dscp" -msgstr "" +msgstr "Permettre l'accès pour luci-app-dscp" #: luci-app-omr-dscp/luasrc/controller/omr-dscp.lua:4 #: luci-app-omr-dscp/root/usr/share/luci/menu.d/luci-app-omr-dscp.json:3 From 1daa1f897c2555b2424c937918e41f1e4cce5fa9 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:21:45 +0000 Subject: [PATCH 55/91] Translated using Weblate (French) Currently translated at 100.0% (12 of 12 strings) Translation: OpenMPTCProuter/LuCI/applications/omr-quota Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsomr-quota/fr/ --- luci-app-omr-quota/po/fr/omr-quota.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-omr-quota/po/fr/omr-quota.po b/luci-app-omr-quota/po/fr/omr-quota.po index a7af2a13a..e67782587 100644 --- a/luci-app-omr-quota/po/fr/omr-quota.po +++ b/luci-app-omr-quota/po/fr/omr-quota.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -11,7 +11,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-omr-quota/luasrc/view/omr-quota/cbi-select-add.htm:8 msgid "Add" @@ -23,7 +23,7 @@ msgstr "Activer" #: luci-app-omr-quota/root/usr/share/rpcd/acl.d/luci-app-omr-quota.json:3 msgid "Grant UCI access for luci-app-omr-quota" -msgstr "" +msgstr "Permettre l'accès à luci-app-omr-quota" #: luci-app-omr-quota/luasrc/model/cbi/quota/quota.lua:10 msgid "Interfaces" From b43aa89c61b528279bb077cca42bb9e55414aab4 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:23:57 +0000 Subject: [PATCH 56/91] Translated using Weblate (French) Currently translated at 100.0% (21 of 21 strings) Translation: OpenMPTCProuter/LuCI/applications/glorytun-tcp Translate-URL: http://weblate.openmptcprouter.com/projects/omr/glorytun-tcp/fr/ --- luci-app-glorytun-tcp/po/fr/glorytun-tcp.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po b/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po index 8fac07bca..977d4d7e7 100644 --- a/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po +++ b/luci-app-glorytun-tcp/po/fr/glorytun-tcp.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -8,7 +8,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:32 msgid "Advanced Settings" @@ -89,7 +89,7 @@ msgstr "Serveur" #: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:73 msgid "Timeout" -msgstr "Temporisation" +msgstr "Hors Délais" #: luci-app-glorytun-tcp/htdocs/luci-static/resources/view/services/glorytun-tcp.js:70 msgid "chacha" From 5219d7ab2c8699543a290f0a8bf346109088ea7b Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:21:56 +0000 Subject: [PATCH 57/91] Translated using Weblate (French) Currently translated at 100.0% (18 of 18 strings) Translation: OpenMPTCProuter/LuCI/applications/mlvpn Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsmlvpn/fr/ --- luci-app-mlvpn/po/fr/mlvpn.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-mlvpn/po/fr/mlvpn.po b/luci-app-mlvpn/po/fr/mlvpn.po index f7ef82ca8..97c7d305e 100644 --- a/luci-app-mlvpn/po/fr/mlvpn.po +++ b/luci-app-mlvpn/po/fr/mlvpn.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-04-30 16:16+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -8,7 +8,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.5.2\n" +"X-Generator: Weblate 4.6.1\n" #: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:32 msgid "Advanced Settings" @@ -20,7 +20,7 @@ msgstr "Client" #: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:75 msgid "Disable encryption" -msgstr "" +msgstr "Désactiver le chiffrement" #: luci-app-mlvpn/htdocs/luci-static/resources/view/services/mlvpn.js:34 msgid "Enabled" From 8a4ac3e1e62689d972981ffdffe581d46c649e7f Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:25:08 +0000 Subject: [PATCH 58/91] Translated using Weblate (French) Currently translated at 94.8% (37 of 39 strings) Translation: OpenMPTCProuter/LuCI/applications/snmpd Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationssnmpd/fr/ --- luci-app-snmpd/po/fr/snmpd.po | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/luci-app-snmpd/po/fr/snmpd.po b/luci-app-snmpd/po/fr/snmpd.po index 976057fbf..7efb48a42 100644 --- a/luci-app-snmpd/po/fr/snmpd.po +++ b/luci-app-snmpd/po/fr/snmpd.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-05-21 19:20+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -57,7 +57,7 @@ msgstr "" #: luci-app-snmpd/luasrc/view/snmpd.htm:21 #: luci-app-snmpd/luasrc/view/snmpd.htm:48 msgid "General" -msgstr "" +msgstr "Général" #: luci-app-snmpd/root/usr/share/rpcd/acl.d/luci-app-snmpd.json:3 msgid "Grant UCI access for luci-app-snmpd" @@ -80,11 +80,11 @@ msgstr "Interface" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:101 msgid "Level" -msgstr "" +msgstr "Niveau" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:22 msgid "Location" -msgstr "" +msgstr "Localisation" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:24 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:137 @@ -97,11 +97,11 @@ msgstr "Réseaux" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:116 msgid "Notify" -msgstr "" +msgstr "Notifier" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:136 msgid "ObjectID" -msgstr "" +msgstr "ObjectID" #: luci-app-snmpd/luasrc/view/snmpd.htm:55 #: luci-app-snmpd/luasrc/view/snmpd.htm:90 @@ -110,7 +110,7 @@ msgstr "Interface de sortie" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:138 msgid "Program" -msgstr "" +msgstr "Programme" #: luci-app-snmpd/luasrc/view/snmpd.htm:85 #: luci-app-snmpd/luasrc/view/snmpd.htm:89 @@ -119,28 +119,28 @@ msgstr "Protocoles" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:106 msgid "Read" -msgstr "" +msgstr "Lecture" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:34 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:69 msgid "Read-only" -msgstr "" +msgstr "Lecture Seule" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:35 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:70 msgid "Read-write" -msgstr "" +msgstr "Lecture-écriture" #: luci-app-snmpd/luasrc/controller/snmpd.lua:6 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:4 #: luci-app-snmpd/luasrc/view/snmpd.htm:19 #: luci-app-snmpd/root/usr/share/luci/menu.d/luci-app-snmpd.json:3 msgid "SNMPd" -msgstr "" +msgstr "SNMPd" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:4 msgid "SNMPd settings interface (Beta)" -msgstr "" +msgstr "Paramètres du protocole SNMPd (Beta)" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:32 msgid "Server" @@ -148,7 +148,7 @@ msgstr "Serveur" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:37 msgid "Source" -msgstr "" +msgstr "Source" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:19 msgid "System" @@ -156,23 +156,23 @@ msgstr "Système" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:111 msgid "Write" -msgstr "" +msgstr "Ecriture" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:92 msgid "any" -msgstr "" +msgstr "Tout" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:104 msgid "auth" -msgstr "" +msgstr "Authentification" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:29 msgid "com2sec security" -msgstr "" +msgstr "com2sec security" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:103 msgid "noauth" -msgstr "" +msgstr "pas d'authentification" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:67 msgid "secname" @@ -181,4 +181,4 @@ msgstr "" #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:76 #: luci-app-snmpd/luasrc/model/cbi/snmpd.lua:90 msgid "version" -msgstr "" +msgstr "version" From 6af138896469d2d691843b61bd22bf39513e8fd8 Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Fri, 18 Feb 2022 07:25:39 +0000 Subject: [PATCH 59/91] Translated using Weblate (French) Currently translated at 100.0% (50 of 50 strings) Translation: OpenMPTCProuter/LuCI/mod/dashboard Translate-URL: http://weblate.openmptcprouter.com/projects/omr/lucimoddashboard/fr/ --- luci-mod-dashboard/po/fr/dashboard.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/luci-mod-dashboard/po/fr/dashboard.po b/luci-mod-dashboard/po/fr/dashboard.po index cdf32c682..ee91c668b 100644 --- a/luci-mod-dashboard/po/fr/dashboard.po +++ b/luci-mod-dashboard/po/fr/dashboard.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-05-31 18:51+0000\n" +"PO-Revision-Date: 2022-02-19 07:53+0000\n" "Last-Translator: Weblate Admin \n" "Language-Team: French \n" @@ -47,11 +47,11 @@ msgstr "Tableau de bord" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/20_lan.js:136 msgid "Devices" -msgstr "Appareils" +msgstr "Périphériques" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:195 msgid "Devices Connected" -msgstr "Appareils connectés" +msgstr "Périphériques connectés" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:86 msgid "Down." @@ -71,7 +71,7 @@ msgstr "Version du micrologiciel" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:173 msgid "GHz" -msgstr "Ghz" +msgstr "GHz" #: luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json:25 msgid "Grant access to DHCP status display" @@ -83,7 +83,7 @@ msgstr "Permettre l'accès à l'affichage de l'état principal" #: luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json:3 msgid "Grant access to the system route status" -msgstr "Permettre l'acces au Status du Routage" +msgstr "Permettre l’accès au status de routage" #: luci-mod-dashboard/root/usr/share/rpcd/acl.d/luci-mod-dashboard.json:34 msgid "Grant access to wireless status display" @@ -220,4 +220,4 @@ msgstr "non" #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js:101 #: luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/30_wifi.js:65 msgid "yes" -msgstr "Oui" +msgstr "oui" From 343eb53b1f7baced0b46c8d9adfaeeb841378f5c Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Sat, 19 Feb 2022 10:19:00 +0000 Subject: [PATCH 60/91] Translated using Weblate (German) Currently translated at 53.6% (154 of 287 strings) Translation: OpenMPTCProuter/LuCI/applications/openmptcprouter Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsopenmptcprouter/de/ --- .../po/de/openmptcprouter.po | 133 ++++++++---------- 1 file changed, 59 insertions(+), 74 deletions(-) diff --git a/luci-app-openmptcprouter/po/de/openmptcprouter.po b/luci-app-openmptcprouter/po/de/openmptcprouter.po index 58d482708..7efcbe36f 100644 --- a/luci-app-openmptcprouter/po/de/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/de/openmptcprouter.po @@ -1,14 +1,14 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-10-21 12:55+0000\n" -"Last-Translator: Anonymous \n" +"PO-Revision-Date: 2022-02-19 10:30+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: German \n" "Language: de\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" +"X-Generator: Weblate 4.10.1\n" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:307 msgid "A Dead Simple VPN is a TCP VPN that can replace Glorytun TCP" @@ -23,10 +23,12 @@ msgstr "Schlüssel 'Dead Simple VPN'" msgid "" "A second server's IP can be set for dual IPv4/IPv6 server if WAN IPv6 are set" msgstr "" +"Die zweite IP eines Servers kann für Dual-IPv4/IPv6-Server festgelegt " +"werden, wenn WAN-IPv6 eingerichtet ist" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:111 msgid "API username to retrieve personnalized settings from the server." -msgstr "API Benutzername zum Download der Settings vom Server." +msgstr "API Benutzername zum Download der Einstellungen vom Server." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:809 msgid "APN" @@ -88,7 +90,7 @@ msgstr "Backup der Router-Einstellungen auf den Server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:371 msgid "Balancing" -msgstr "" +msgstr "Ausgleich" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:22 msgid "Beta" @@ -96,11 +98,11 @@ msgstr "Beta" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:310 msgid "Big time difference between the server and the router" -msgstr "" +msgstr "Großer Zeitunterschied zwischen dem Server und dem Router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:564 msgid "Bridge" -msgstr "" +msgstr "Netzwerkbrücke" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:618 msgid "Bridge can't have multipath enabled" @@ -113,28 +115,27 @@ msgstr "" "übertragen." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:221 -#, fuzzy msgid "" "By default proxy is used for any traffic that is TCP (and UDP for V2Ray)." msgstr "" -"IP-Pakete, die nicht TCP sind, werden standardmäßig mit einem VPN-Protokoll " -"übertragen." +"Standard wird TCP Netzwerk Verkehr über Proxy übertragen (Auch UDP für " +"V2Ray)." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:840 msgid "CHAP" -msgstr "" +msgstr "CHAP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:271 msgid "Can\\'t access and use server part" -msgstr "" +msgstr "Kann Server Teil nicht öffnen und verwenden" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:297 msgid "Can\\'t contact Server Admin Script" -msgstr "" +msgstr "Kann nicht verbinden zum Server Admin Skript" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:287 msgid "Can\\'t get public IP address from ShadowSocks" -msgstr "" +msgstr "Kann keine Public IP Adresse vom ShadowSocks beziehen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:290 msgid "Can\\'t get public IP address from V2Ray" @@ -142,7 +143,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:284 msgid "Can\\'t ping server" -msgstr "" +msgstr "Kann Server nicht pingen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:415 msgid "China" @@ -153,20 +154,22 @@ msgid "" "Choose MacVLAN if you want to create a virtual interface based on a physical " "interface." msgstr "" +"Wähle MacVLAN um ein virtuelles Interface basierend auf ein Physikalisches " +"Interface an zu legen." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:502 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:588 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:647 msgid "Choose physical interface." -msgstr "" +msgstr "Wähle physikalische Schnittstelle." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:135 msgid "Core temp:" -msgstr "" +msgstr "Kerntemperatur:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:410 msgid "Country" -msgstr "" +msgstr "Land" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:407 #, fuzzy @@ -179,22 +182,20 @@ msgid "DHCP" msgstr "DHCP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:600 -#, fuzzy msgid "DHCPv6" -msgstr "DHCP" +msgstr "DHCPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:188 msgid "DNS issue: can\\'t resolve hostname" -msgstr "" +msgstr "DNS Problem: Hostnamen nicht beziehbar" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:355 msgid "Debug" -msgstr "" +msgstr "Debug" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:223 -#, fuzzy msgid "Default Proxy" -msgstr "Standard VPN" +msgstr "Standard Proxy" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:337 msgid "Default VPN" @@ -209,7 +210,7 @@ msgstr "Löschen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:768 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:789 msgid "Device" -msgstr "" +msgstr "Gerät" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:253 #, fuzzy @@ -232,13 +233,12 @@ msgstr "" "Abschalten von TCP-Fast-Open für Linux und die ShadowsSocks-Einstellungen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:295 -#, fuzzy msgid "Disable default gateway" -msgstr "Gateway-Ping aus" +msgstr "Default Gateway aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:300 msgid "Disable default gateway, no internet if VPS are down" -msgstr "" +msgstr "Default Gateway aus, kein Internet wenn VPS down ist" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:193 msgid "Disable external check" @@ -254,13 +254,12 @@ msgid "Disable gateway ping check in status page" msgstr "Gateway-Ping Statusüberprüfung aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:279 -#, fuzzy msgid "Disable interfaces auto rename" -msgstr "Externe Prüfung aus" +msgstr "Automatische Umbenennung von Interfaces deaktivieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:330 msgid "Disable multipath test using tracebox" -msgstr "" +msgstr "Deaktiviere multipath Test mittels Tracebox" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:335 #, fuzzy @@ -277,9 +276,8 @@ msgid "" msgstr "Portweiterleitungen in der Server-Firewall zu diesem Router abschalten" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:284 -#, fuzzy msgid "Disable renaming interfaces" -msgstr "Bezeichnung der Schnittstelle" +msgstr "Umbenennung der Schnittstelle deaktivieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:315 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:320 @@ -288,14 +286,12 @@ msgid "Disable route loop detection" msgstr "Server-Ping aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:144 -#, fuzzy msgid "Disable server" -msgstr "Server-Ping aus" +msgstr "Server deaktivieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:248 -#, fuzzy msgid "Disable server http test" -msgstr "Server-Ping aus" +msgstr "Server-http-Test aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:305 msgid "Disable server ping" @@ -306,15 +302,14 @@ msgid "Disable server ping status check" msgstr "Server-Ping Status-Prüfung aus" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:325 -#, fuzzy msgid "Disable tracebox test" -msgstr "Externe Prüfung aus" +msgstr "Deaktiviere tracebox Test" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:189 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:871 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:887 msgid "Disabled" -msgstr "" +msgstr "inaktiv" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:933 msgid "Download speed (Kb/s)" @@ -351,13 +346,12 @@ msgid "Enable ShadowSocks Obfuscating" msgstr "Shadowsocks-Verschleierung aktiv" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:213 -#, fuzzy msgid "Enable TCP Low Latency" -msgstr "TCP-Fast-Open aus" +msgstr "Aktiviere TCP Low Latency" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:360 msgid "Enable debug logs" -msgstr "" +msgstr "Aktiviere debug Logs" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:190 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:870 @@ -370,31 +364,30 @@ msgid "Encryption" msgstr "Verschlüsselung" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:280 -#, fuzzy msgid "Encryption method is used for Shadowsocks, V2Ray, Glorytun and OpenVPN." -msgstr "Verschlüsselungverfahren wird ebenfalls für Glorytun genutzt." +msgstr "" +"Verschlüsselungverfahren wird verwendet für Shadowsocks, V2Ray, Glorytun " +"and OpenVPN." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:176 msgid "Filesystem is readonly" -msgstr "" +msgstr "Filesystem ist nur lesen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:419 msgid "For China, set an accessible DNS and disable DNSSEC." msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:178 -#, fuzzy msgid "Force retrieve all keys from server." -msgstr "API Benutzername zum Download der Settings vom Server." +msgstr "Erzwingen alle Schlüssel vom Server runter zu laden." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:173 -#, fuzzy msgid "Force retrieve settings" -msgstr "Server-Einstellungen" +msgstr "Erzwingen Einstellungen runter zu laden." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:829 msgid "GPRS only" -msgstr "" +msgstr "Nur GPRS" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:561 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:764 @@ -472,15 +465,13 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:683 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:710 -#, fuzzy msgid "IPv6 address" -msgstr "IPv4-Adresse" +msgstr "IPv6-Adresse" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:697 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:720 -#, fuzzy msgid "IPv6 gateway" -msgstr "IPv4-Standardgateway" +msgstr "IPv6-Standardgateway" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:632 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:804 @@ -488,9 +479,8 @@ msgid "IPv6 route received" msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:184 -#, fuzzy msgid "IPv6 settings" -msgstr "VPN-Einstellungen" +msgstr "IPv6-Einstellungen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:209 msgid "IPv6 tunnel DOWN" @@ -637,7 +627,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:867 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:883 msgid "Multipath TCP" -msgstr "" +msgstr "Multipath-TCP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:601 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:607 @@ -790,7 +780,7 @@ msgstr "Nur eine Verbindung kann als 'primär' definiert werden." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:391 msgid "Only work with Shadowsocks as proxy." -msgstr "" +msgstr "Funktioniert nur mit Shadowsocks als Proxy." #: luci-app-openmptcprouter/root/usr/share/luci/menu.d/luci-app-openmptcprouter.json:3 msgid "OpenMPTCProuter" @@ -802,7 +792,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:218 msgid "Optimize for latency instead of bandwidth" -msgstr "" +msgstr "Für niedrige Latenz anstatt für Bandbreite optimieren" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:455 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:605 @@ -849,11 +839,11 @@ msgstr "Interface hinzufügen" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:825 msgid "Prefer LTE" -msgstr "" +msgstr "Bevorzuge LTE" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:826 msgid "Prefer UMTS" -msgstr "" +msgstr "Bevorzuge UMTS" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:94 #, fuzzy @@ -921,9 +911,8 @@ msgid "Scaling governor" msgstr "Methode der CPU-Taktung" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:95 -#, fuzzy msgid "Secondary server IP" -msgstr "Server IPv4" +msgstr "zweite Server IP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:992 msgid "Select the device you want to base the interface on." @@ -963,9 +952,8 @@ msgid "Server username" msgstr "Server-Benutzername" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:821 -#, fuzzy msgid "Service Type" -msgstr "Server-Schlüssel" +msgstr "Dienst Typ" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:401 msgid "Set VPN to use for MPTCP over VPN." @@ -1106,7 +1094,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:559 msgid "Type" -msgstr "" +msgstr "Typ" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:331 msgid "UBOND can replace Glorytun with connections with same latency" @@ -1176,9 +1164,8 @@ msgid "VLAN" msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:184 -#, fuzzy msgid "VPN is not running" -msgstr "VPN-Einstellungen" +msgstr "VPN läuft nicht" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:286 msgid "VPN settings" @@ -1313,7 +1300,7 @@ msgstr "Statische Adresse" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:516 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:749 msgid "latency:" -msgstr "" +msgstr "Latenz:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:520 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:753 @@ -1352,14 +1339,12 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:496 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:741 -#, fuzzy msgid "wan address:" -msgstr "Statische Adresse" +msgstr "öffentliche IP Adresse:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:500 -#, fuzzy msgid "wan ipv6 address:" -msgstr "Statische Adresse" +msgstr "öffentliche ipv6 Adresse:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:508 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:512 From 644705d89b0ded03ec7bab0947c6594a16c8347a Mon Sep 17 00:00:00 2001 From: Weblate Admin Date: Sat, 19 Feb 2022 10:25:05 +0000 Subject: [PATCH 61/91] Translated using Weblate (Italian) Currently translated at 92.6% (266 of 287 strings) Translation: OpenMPTCProuter/LuCI/applications/openmptcprouter Translate-URL: http://weblate.openmptcprouter.com/projects/omr/luciapplicationsopenmptcprouter/it/ --- .../po/it/openmptcprouter.po | 107 ++++++++---------- 1 file changed, 45 insertions(+), 62 deletions(-) diff --git a/luci-app-openmptcprouter/po/it/openmptcprouter.po b/luci-app-openmptcprouter/po/it/openmptcprouter.po index 1d7926872..6d4ddf076 100644 --- a/luci-app-openmptcprouter/po/it/openmptcprouter.po +++ b/luci-app-openmptcprouter/po/it/openmptcprouter.po @@ -1,14 +1,14 @@ msgid "" msgstr "" -"PO-Revision-Date: 2020-12-01 17:19+0000\n" -"Last-Translator: Giuseppe Dipierro \n" +"PO-Revision-Date: 2022-02-19 10:30+0000\n" +"Last-Translator: Weblate Admin \n" "Language-Team: Italian \n" "Language: it\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.0.4\n" +"X-Generator: Weblate 4.10.1\n" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:307 msgid "A Dead Simple VPN is a TCP VPN that can replace Glorytun TCP" @@ -23,6 +23,8 @@ msgstr "Chiave Dead Simple VPN" msgid "" "A second server's IP can be set for dual IPv4/IPv6 server if WAN IPv6 are set" msgstr "" +"Può essere impostato un secondo IP per il doppio server IPv4/IPv6 se è stato " +"impostato il server WAN IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:111 msgid "API username to retrieve personnalized settings from the server." @@ -106,7 +108,7 @@ msgstr "Ponte" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:618 msgid "Bridge can't have multipath enabled" -msgstr "" +msgstr "Il Bridge non può avere il multipath abilitato" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:287 msgid "By default VPN is used for any traffic that is not TCP." @@ -138,9 +140,8 @@ msgid "Can\\'t get public IP address from ShadowSocks" msgstr "Impossibile ottenere un indirizzo IP pubblico da ShadowSocks" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:290 -#, fuzzy msgid "Can\\'t get public IP address from V2Ray" -msgstr "Impossibile ottenere un indirizzo IP pubblico da ShadowSocks" +msgstr "Impossibile ottenere un indirizzo IP pubblico da V2Ray" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:284 msgid "Can\\'t ping server" @@ -148,7 +149,7 @@ msgstr "Impossibile eseguire il ping del server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:415 msgid "China" -msgstr "" +msgstr "Cina" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:568 msgid "" @@ -170,12 +171,11 @@ msgstr "Temp. Nucleo:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:410 msgid "Country" -msgstr "" +msgstr "Nazione" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:407 -#, fuzzy msgid "Country settings" -msgstr "Impostazioni del router" +msgstr "Impostazioni nazionali del router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:454 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:599 @@ -183,9 +183,8 @@ msgid "DHCP" msgstr "DHCP" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:600 -#, fuzzy msgid "DHCPv6" -msgstr "DHCP" +msgstr "DHCPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:188 msgid "DNS issue: can\\'t resolve hostname" @@ -215,15 +214,13 @@ msgid "Device" msgstr "Dispositivo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:253 -#, fuzzy msgid "Disable HTTP test on Server API in status page" -msgstr "Disabilitare il controllo dello stato del ping del server" +msgstr "Disabilitare il test HTTP sulle API Server nella pagina di stato" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:345 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:350 -#, fuzzy msgid "Disable ModemManager" -msgstr "ModemManager" +msgstr "Disabilita ModemManager" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:203 msgid "Disable TCP Fast Open" @@ -251,24 +248,20 @@ msgid "Disable gateway ping" msgstr "Disabilita il ping del gateway" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:243 -#, fuzzy msgid "Disable gateway ping check in status page" -msgstr "Disabilitare il controllo dello stato del ping del gateway" +msgstr "Disabilita il controllo del ping del gateway nella pagina di stato" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:279 -#, fuzzy msgid "Disable interfaces auto rename" -msgstr "Disabilita il test Tracebox" +msgstr "Disabilita auto rinomina interfacce" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:330 msgid "Disable multipath test using tracebox" msgstr "Disabilita il test multipath usando tracebox" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:335 -#, fuzzy -#| msgid "Disabled" msgid "Disable nDPI" -msgstr "Disabilitato" +msgstr "Disabilita nDPI" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:340 msgid "Disable nDPI, used for protocols in OMR-ByPass" @@ -282,9 +275,8 @@ msgstr "" "a questo router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:284 -#, fuzzy msgid "Disable renaming interfaces" -msgstr "Etichetta per l'interfaccia" +msgstr "Disabilita rinomina interfaccia" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:315 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:320 @@ -297,9 +289,8 @@ msgid "Disable server" msgstr "Disabilita il server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:248 -#, fuzzy msgid "Disable server http test" -msgstr "Disabilita il ping del server" +msgstr "Disabilita http test server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:305 msgid "Disable server ping" @@ -329,12 +320,11 @@ msgstr "Cambiamento dinamico" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:390 msgid "Enable Bridge Acceleration" -msgstr "" +msgstr "Abilita Accelerazione modalità Bridge" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:209 -#, fuzzy msgid "Enable DNS64" -msgstr "Abilita MQ" +msgstr "Abilita DNS64" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm:384 msgid "Enable Fast Patch offloading for connections" @@ -383,7 +373,7 @@ msgstr "Il filesystem è di sola lettura" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:419 msgid "For China, set an accessible DNS and disable DNSSEC." -msgstr "" +msgstr "Per la Cina, imposta un DNS accessibile e disabilita DNSSEC." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:178 msgid "Force retrieve all keys from server." @@ -403,9 +393,8 @@ msgid "Gateway DOWN" msgstr "Tipi di pagamento" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:564 -#, fuzzy msgid "Gateway IPv6 DOWN" -msgstr "Tipi di pagamento" +msgstr "Gateway IPv6 SPENTO" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:295 msgid "Glorytun TCP is used by default for UDP and ICMP" @@ -475,15 +464,13 @@ msgstr "Prefisso IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:683 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:710 -#, fuzzy msgid "IPv6 address" -msgstr "Indirizzi IPv4" +msgstr "Indirizzi IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:697 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:720 -#, fuzzy msgid "IPv6 gateway" -msgstr "Gateway IPv4" +msgstr "Gateway IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:632 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:804 @@ -504,7 +491,7 @@ msgstr "IPv6:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:214 msgid "If host support NAT64, you can enable DNS64 support." -msgstr "" +msgstr "Se l'host supporta NAT64, puoi abilitare il supporto DNS64." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:529 msgid "Interfaces settings" @@ -588,15 +575,16 @@ msgid "MPTCP over VPN" msgstr "MPTCP su VPN" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:390 -#, fuzzy msgid "MPTCP over VPN settings" -msgstr "MPTCP su VPN" +msgstr "Impostazioni MPTCP su VPN" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:391 msgid "" "MPTCP over VPN should be used only when Multipath TCP is blocked on a " "connection." msgstr "" +"MPTCP su VPN deve essere usato solo quando il Multipath TCP è bloccatp su " +"una connessione." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:563 msgid "MacVLAN" @@ -650,7 +638,7 @@ msgstr "Lo stato corrente di Multipath è" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:596 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:782 msgid "Multipath master already defined" -msgstr "Multipath master già definito" +msgstr "Multipath principale già definito" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:567 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:767 @@ -666,9 +654,8 @@ msgid "NONE" msgstr "NESSUNO" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:623 -#, fuzzy msgid "Network interface MAC address duplicated" -msgstr "Interfaccia di rete duplicata" +msgstr "Interfaccia di rete con MAC address duplicata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:613 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:799 @@ -676,9 +663,8 @@ msgid "Network interface duplicated" msgstr "Interfaccia di rete duplicata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:579 -#, fuzzy msgid "Network interface not in WAN firewall zone" -msgstr "Interfaccia di rete duplicata" +msgstr "Interfaccia di rete non in WAN firewall zone" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:899 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:901 @@ -699,18 +685,17 @@ msgid "No IPv6 access" msgstr "Nessun accesso IPv6" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:575 -#, fuzzy msgid "No Server http response after 1 second" -msgstr "Nessuna risposta al ping del server dopo 1 secondo" +msgstr "Nessuna risposta dal server HTTP dopo 1 secondo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:571 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:771 msgid "No Server ping response after 1 second" -msgstr "Nessuna risposta al ping del server dopo 1 secondo" +msgstr "Nessuna risposta al ping dal server dopo 1 secondo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:656 msgid "No WAN with multipath enabled:" -msgstr "" +msgstr "Nessuna WAN con multipath abilitata:" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm:26 msgid "No available backup on server." @@ -735,14 +720,12 @@ msgid "No output" msgstr "Nessun output" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:293 -#, fuzzy msgid "No public IP address detected in less than 1 second" -msgstr "Nessun indirizzo IP WAN rilevato in meno di 1 secondo" +msgstr "Nessun indirizzo IP pubblico rilevato in meno di 1 secondo" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:267 -#, fuzzy msgid "No server IP address, No public IP address" -msgstr "Nessun indirizzo IP del server, nessun indirizzo IP WAN" +msgstr "Nessun indirizzo IP del server, nessun indirizzo IP pubblico" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm:280 msgid "No server defined" @@ -783,13 +766,15 @@ msgstr "Al cambio della procedura guidata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:233 msgid "Only ShadowSocks is supported with server multiple IPs for now." -msgstr "" +msgstr "Solo ShadowSocks è supportato con server multi IP per adesso." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:877 msgid "" "Only one interface must be set as \"Master\", this should be the most stable " "interface." msgstr "" +"Solo un' interfaccia può essere impostata come \"Master\", deve essere " +"impostata l'interfaccia più stabile." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:135 msgid "Only one server can be master, else all servers are set as backup." @@ -799,7 +784,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:391 msgid "Only work with Shadowsocks as proxy." -msgstr "" +msgstr "Funziona solo con Shadowsocks come proxy." #: luci-app-openmptcprouter/root/usr/share/luci/menu.d/luci-app-openmptcprouter.json:3 msgid "OpenMPTCProuter" @@ -861,9 +846,8 @@ msgid "Prefer UMTS" msgstr "Preferisci UMTS" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:94 -#, fuzzy msgid "Primary server IP" -msgstr "Indirizzo IP del server" +msgstr "IP principale del server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:449 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:594 @@ -896,7 +880,7 @@ msgstr "Reindirizza tutte le porte dal server a questo router" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:999 msgid "Reset" -msgstr "" +msgstr "Resetta" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm:32 msgid "Restore backup" @@ -924,9 +908,8 @@ msgid "Scaling governor" msgstr "Governatore in scala" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:95 -#, fuzzy msgid "Secondary server IP" -msgstr "Indirizzo IP del server" +msgstr "IP secondario del server" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:992 msgid "Select the device you want to base the interface on." @@ -968,7 +951,7 @@ msgstr "Tipo di servizio" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:401 msgid "Set VPN to use for MPTCP over VPN." -msgstr "" +msgstr "Seleziona la VPN da utilizzare per MPTCP su VPN." #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:658 #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:688 @@ -1225,7 +1208,7 @@ msgstr "" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:65 msgid "Wizard" -msgstr "Wizard" +msgstr "Procedura guidata" #: luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm:414 msgid "World" From 2ea13ecfaa1a2d787d14c32fb29c5740aba3f9e9 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sun, 20 Feb 2022 09:04:39 +0100 Subject: [PATCH 62/91] Fix status page error abproxy disabled when MPTCP over VPN is used on all interfaces --- .../root/usr/libexec/rpcd/openmptcprouter | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter index 9c9ab517b..a06035f7f 100755 --- a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter +++ b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter @@ -1027,7 +1027,7 @@ function interfaces_status() mArray.openmptcprouter["multi_vpn"] = true end end - + -- check Shadowsocks is running mArray.openmptcprouter["shadowsocks_service"] = false if string.find(sys.exec("/usr/bin/pgrep ss-redir"), "%d+") then @@ -1035,10 +1035,16 @@ function interfaces_status() end mArray.openmptcprouter["shadowsocks_enabled"] = true - local ss_server = uci:get("shadowsocks-libev","sss0","disabled") or "0" + local ss_server = "1" + ucic:foreach("shadowsocks-libev", "server", function(s) + if uci:get("shadowsocks-libev",s[".name"],"disabled") == "0" then + ss_server = "0" + end + end) if ss_server == "1" then mArray.openmptcprouter["shadowsocks_enabled"] = false end + -- check V2Ray is running mArray.openmptcprouter["v2ray_service"] = false if string.find(sys.exec("/usr/bin/pgrep v2ray"), "%d+") then From 57c6fbc13f091c7957271776102cb5417aef3f10 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 23 Feb 2022 20:59:59 +0100 Subject: [PATCH 63/91] Add milkywan tv in DSCP --- luci-app-omr-dscp/root/etc/config/dscp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/luci-app-omr-dscp/root/etc/config/dscp b/luci-app-omr-dscp/root/etc/config/dscp index ef2ef31f2..310ae3e31 100644 --- a/luci-app-omr-dscp/root/etc/config/dscp +++ b/luci-app-omr-dscp/root/etc/config/dscp @@ -256,3 +256,8 @@ config domains option class 'cs1' option comment 'WindowsUpdate' +config domains + option name 'tv.milkywan.fr' + option class 'cs5' + option comment 'MilkyWan TV' + From 00a1919ad10310b9ac039072f38b61232a9f15d8 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 23 Feb 2022 21:00:52 +0100 Subject: [PATCH 64/91] Add rutx in github actions build --- .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 ab824216b..a5d283713 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: build: strategy: matrix: - OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800] + OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx] OMR_KERNEL: [5.4, 5.15] runs-on: ubuntu-latest continue-on-error: true From 6c08bdbe9f60749a87e596156bd3431d261f607a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 8 Mar 2022 15:47:26 +0100 Subject: [PATCH 65/91] Fix omr-tracker --- omr-tracker/files/bin/omr-tracker | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index 0799c90ce..910654913 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -85,11 +85,12 @@ _post_tracking() { _log() { logger -t "post-tracking-${tracker_bin##*/}" "$*" } - tmp=$(mktemp) - . "$tracker_bin" 2>&1 > "$tmp" - trackresult=$(< "$tmp") - [ -n "$trackresult" ] && _log $trackresult - rm -f "$tmp" + . "$tracker_bin" 2>&1 + #tmp=$(mktemp) + #. "$tracker_bin" 2>&1 > "$tmp" + #trackresult=$(< "$tmp") + #[ -n "$trackresult" ] && _log $trackresult + #rm -f "$tmp" ) done } From cf15b5161c6d8f76c56e696942694c46e14f110c Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 11 Mar 2022 20:05:50 +0100 Subject: [PATCH 66/91] Update ModemManger, libmbim and libqmi --- libmbim/Makefile | 4 ++-- libqmi/Makefile | 4 ++-- modemmanager/Makefile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libmbim/Makefile b/libmbim/Makefile index 32c8ef493..505ae7bc6 100644 --- a/libmbim/Makefile +++ b/libmbim/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmbim -PKG_VERSION:=1.26.0 +PKG_VERSION:=1.26.2 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libmbim -PKG_HASH:=1e1f0926b22c77210442129eca689722ecf324ab9c9abf421a5c989f46e813cf +PKG_HASH:=10c77bf5b5eb8c92ba80e9b519923ad9b898362bc8e1928e2bc9a17eeba649af PKG_MAINTAINER:=Nicholas Smith diff --git a/libqmi/Makefile b/libqmi/Makefile index ee5b69749..d3ebdeecd 100644 --- a/libqmi/Makefile +++ b/libqmi/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libqmi -PKG_VERSION:=1.30.2 +PKG_VERSION:=1.30.4 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/libqmi -PKG_HASH:=be01ece0ea2c2194cbea5744bf5aaf06c04ba5fb7ec7887a13116c76d114fedd +PKG_HASH:=00d7da30a4f8d1185f37cba289cfaf1dfcd04a58f2f76d6acfdf5b85312d6ed6 PKG_MAINTAINER:=Nicholas Smith diff --git a/modemmanager/Makefile b/modemmanager/Makefile index 1dbccf127..3eb780398 100644 --- a/modemmanager/Makefile +++ b/modemmanager/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager -PKG_VERSION:=1.18.4 +PKG_VERSION:=1.18.6 PKG_RELEASE:=1 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager -PKG_HASH:=11fb970f63e2da88df4b6d8759e4ee649944c515244b979bf50a7a6df1d7f199 +PKG_HASH:=d4f804b31cf504239c5f1d4973c62095c00cba1ee9abb503718dac6d146a470a PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION) PKG_MAINTAINER:=Nicholas Smith From eb87da4feb233cc90a6261223d064db408e87f77 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 14 Mar 2022 20:57:38 +0100 Subject: [PATCH 67/91] Add network modems configuration for RUTX12 --- .../files/etc/uci-defaults/1920-omr-network | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index c8be3490a..18726e3f0 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -306,6 +306,54 @@ sed -i 's/omrip/oip/g' /etc/config/* uci -q delete network.loopback.ifname uci -q set network.loopback.device='lo' +local board=$(board_name) +if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ] && [ "$(mnf_info -n)" = "RUTX1200XXXX" ]; then + uci -q batch <<-EOF + set network.modem1=interface + set network.modem1.proto='modemmanager' + set network.modem1.apn='' + set network.modem1.auth='none' + set network.modem1.iptype='ipv4v6' + set network.modem1.addlatency='0' + set network.modem1.force_link='1' + set network.modem1.device='/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1' + set network.wan_modem1=interface + set network.wan_modem1.proto='dhcp' + set network.wan_modem1.device='wwan0' + set network.wan_modem1.force_link='1' + set network.wan_modem1.multipath='on' + set network.wan_modem1.addlatency='0' + set network.wan_modem1.hostname='*' + set network.wan_modem1.defaultroute='0' + set network.wan_modem1.peerdns='0' + set network.wan_modem1.ip4table=wan + commit network + add_list firewall.@zone[1].network='wan_modem1' + commit firewall + set network.modem2=interface + set network.modem2.proto='modemmanager' + set network.modem2.apn='' + set network.modem2.auth='none' + set network.modem2.iptype='ipv4v6' + set network.modem2.addlatency='0' + set network.modem2.force_link='1' + set network.modem2.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2' + set network.wan_modem2=interface + set network.wan_modem2.proto='dhcp' + set network.wan_modem2.device='wwan1' + set network.wan_modem2.force_link='1' + set network.wan_modem2.multipath='on' + set network.wan_modem2.addlatency='0' + set network.wan_modem2.hostname='*' + set network.wan_modem2.defaultroute='0' + set network.wan_modem2.peerdns='0' + set network.wan_modem2.ip4table=wan + commit network + add_list firewall.@zone[1].network='wan_modem2' + commit firewall + EOF +fi + uci -q commit macvlan uci -q commit network rm -f /tmp/luci-indexcache From a4d9f6dd39fa9bfa7e761085405bc64cafe1eedf Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 16 Mar 2022 20:54:34 +0100 Subject: [PATCH 68/91] Fix status page when proto is modemmanager --- 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 a06035f7f..f8ac6eca0 100755 --- a/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter +++ b/luci-app-openmptcprouter/root/usr/libexec/rpcd/openmptcprouter @@ -1160,7 +1160,7 @@ function interfaces_status() --end duplicateif = false - if ifname ~= "" and ifname ~= nil and not (section["device"] ~= nil and section["device"]:match("^@.*")) then + if ifname ~= "" and ifname ~= nil and not (section["device"] ~= nil and section["device"]:match("^@.*")) and (proto == "static" or proto == "dhcp") then if allintf[ifname] then connectivity = "ERROR" duplicateif = true From 8b1740d1a0230c33102efb25f1d83f558fcd932a Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Mon, 28 Mar 2022 16:03:16 +0800 Subject: [PATCH 69/91] Delete 010-udev-avoid-0-9-as-shell-globbing-patters.patch --- ...-avoid-0-9-as-shell-globbing-patters.patch | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch diff --git a/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch b/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch deleted file mode 100644 index 1b919ba2c..000000000 --- a/modemmanager/patches/010-udev-avoid-0-9-as-shell-globbing-patters.patch +++ /dev/null @@ -1,60 +0,0 @@ -From e9f254ba3f923248efffe4fd458dc5e5469e0f73 Mon Sep 17 00:00:00 2001 -From: Aleksander Morgado -Date: Wed, 1 Dec 2021 21:40:00 +0100 -Subject: [PATCH] udev: avoid [0-9]* as shell globbing patterns - -The udev rules expect matches based on shell globbing pattern, not -based on regex. This means that "[0-9]*" doesn't mean "zero or more -digits", it actually means "one digit and zero or more other -characters". - -So, avoid the regex like match, even if it worked for us, because it -didn't mean what we thought it meant, plus, it breaks our custom udev -rules processing logic, in which we convert the input patterns into -real regex expressions. - -See https://bbs.archlinux.org/viewtopic.php?pid=1415916#p1415916 - -While at it, also make sure that the wildcard matching is done -exclusively for prefix and suffix matches, never in the middle of -a string, or our custom rules parser would not match correctly. ---- - plugins/qcom-soc/77-mm-qcom-soc.rules | 8 ++++---- - src/80-mm-candidate.rules | 2 +- - 2 files changed, 5 insertions(+), 5 deletions(-) - ---- a/plugins/qcom-soc/77-mm-qcom-soc.rules -+++ b/plugins/qcom-soc/77-mm-qcom-soc.rules -@@ -24,17 +24,17 @@ ENV{ID_MM_QCOM_SOC}="1" - ENV{ID_MM_PHYSDEV_UID}="qcom-soc" - - # port type hints for the rpmsgexport-ed ports --SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" --SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" -+SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}=="*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" -+SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}!="*_CNTL", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" - - # ignore every other port without explicit hints - SUBSYSTEM=="rpmsg", ENV{ID_MM_PORT_TYPE_QMI}!="1", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}!="1", ENV{ID_MM_PORT_IGNORE}="1" - - # explicitly ignore ports intended for USB tethering (DATA40, DATA40_CNTL) - SUBSYSTEM=="rpmsg", ATTR{name}=="DATA40*", ENV{ID_MM_PORT_IGNORE}="1" --KERNEL=="rmnet_usb[0-9]*", ENV{ID_MM_PORT_IGNORE}="1" -+KERNEL=="rmnet_usb*", ENV{ID_MM_PORT_IGNORE}="1" - - # flag all rpmsg ports under this plugin as candidate --KERNEL=="rpmsg[0-9]*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" -+KERNEL=="rpmsg*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" - - LABEL="mm_qcom_soc_end" ---- a/src/80-mm-candidate.rules -+++ b/src/80-mm-candidate.rules -@@ -15,7 +15,7 @@ KERNEL=="rfcomm*", DEVPATH=="*/virtual/* - - SUBSYSTEM=="tty", ENV{ID_MM_CANDIDATE}="1" - SUBSYSTEM=="net", ENV{ID_MM_CANDIDATE}="1" --KERNEL=="cdc-wdm[0-9]*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" -+KERNEL=="cdc-wdm*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" - - # WWAN subsystem port handling - # - All USB devices ignored for now, only PCI devices expected From a949d1f55791ccc66ab8f1a443995adb55277561 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 28 Mar 2022 18:29:13 +0200 Subject: [PATCH 70/91] Run script for fw only if server defined --- mptcp/files/usr/share/omr/post-tracking.d/post-tracking | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0e8ca6953..9b5e53d11 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -1577,7 +1577,7 @@ if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter fi -if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then +if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then _log "Set firewall on server" /etc/init.d/openmptcprouter-vps set_vps_firewall >/dev/null 2>&1 From e3eae6d44ebb78c57aef4c28bd952f51878e5a56 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 29 Mar 2022 19:54:58 +0200 Subject: [PATCH 71/91] Check that API give an output before setting fw --- openmptcprouter/files/etc/init.d/openmptcprouter-vps | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmptcprouter/files/etc/init.d/openmptcprouter-vps b/openmptcprouter/files/etc/init.d/openmptcprouter-vps index 9c581ea92..6ac763eac 100755 --- a/openmptcprouter/files/etc/init.d/openmptcprouter-vps +++ b/openmptcprouter/files/etc/init.d/openmptcprouter-vps @@ -1140,9 +1140,11 @@ _set_vps_firewall() { username="$(uci -q get openmptcprouter.${fwservername}.username)" settings='{"name" : "redirect router"}' fw_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw_list" ] && return vpsfwlist=$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d') settings='{"name" : "open router"}' fw_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw_list" ] && return if [ -n "$vpsfwlist" ]; then vpsfwlist="$vpsfwlist\n$(echo $fw_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')" else @@ -1150,9 +1152,11 @@ _set_vps_firewall() { fi settings='{"name" : "redirect router","ipproto" : "ipv6"}' fw6_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw6_list" ] && return vpsfw6list=$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d') settings='{"name" : "open router","ipproto" : "ipv6"}' fw6_list=$(_set_json "shorewalllist" "$settings") + [ -z "$fw6_list" ] && return if [ -n "$vpsfw6list" ]; then vpsfw6list="$vpsfw6list\n$(echo $fw6_list | jsonfilter -q -e '@.list[*]' | sed '/^[[:space:]]*$/d')" else From af89e81dff7d857fd4b6569dd3d5507e2a9c01bf Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 31 Mar 2022 20:16:12 +0200 Subject: [PATCH 72/91] Fix wizard page --- .../luasrc/view/openmptcprouter/wizard.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index dafe89a3d..d1a819796 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -428,7 +428,7 @@ <% for _, iface in ipairs(net:get_networks()) do local ifname = iface:name() - local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | grep " .. ifname)) + local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | grep \'" .. ifname .. "\'")) if firewall_lan ~= "" then %>

<%=ifname%>

@@ -531,7 +531,7 @@ <% for _, iface in ipairs(net:get_networks()) do local ifname = iface:name() - local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | grep " .. ifname)) + local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | grep \'" .. ifname .. "\'")) if firewall_wan ~= "" then -- local multipath = uci:get("network",ifname,"multipath") From 2248e12100c42a0007dca54c732bae43596518cf Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Apr 2022 13:24:07 +0200 Subject: [PATCH 73/91] Make wizard page faster to display --- .../luasrc/view/openmptcprouter/wizard.htm | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index d1a819796..e447518f4 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -7,9 +7,15 @@ local sys = require "luci.sys" local ut = require "luci.util" local ifaces = sys.net:devices() + local ifttyu = nixio.fs.glob("/dev/ttyUSB*") + local ifttyc = nixio.fs.glob("/dev/cdc-wdm*") menuentry = uci:get("openmptcprouter","settings","menu") or "openmptcprouter" function device_notvirtual(dev) - for _, iface in ipairs(net:get_networks()) do + if dev:match("^eth.*") or dev:match("^wwan.*") or dev:match("^tun.*") or dev:match("/") then + return true + end + networks = net:get_networks() + for _, iface in ipairs(networks) do local ifacen = iface:name() local ifacename = uci:get("network",ifacen,"device") local ifacetype = uci:get("network",ifacen,"type") or "" @@ -428,7 +434,7 @@ <% for _, iface in ipairs(net:get_networks()) do local ifname = iface:name() - local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | grep \'" .. ifname .. "\'")) + local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | tr ' ' '\n' | grep \'^" .. ifname .. "$\'")) if firewall_lan ~= "" then %>

<%=ifname%>

@@ -531,7 +537,7 @@ <% for _, iface in ipairs(net:get_networks()) do local ifname = iface:name() - local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | grep \'" .. ifname .. "\'")) + local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | tr ' ' '\n' | grep \'^" .. ifname .. "$\'")) if firewall_wan ~= "" then -- local multipath = uci:get("network",ifname,"multipath") @@ -743,14 +749,12 @@ <% iffind=0 - iftty = nixio.fs.glob("/dev/cdc-wdm*") - for tty in iftty do + for tty in ifttyc do %> <% From e959dc316f4bfcb3443ee3e5b0231775318cbd78 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Apr 2022 13:24:30 +0200 Subject: [PATCH 74/91] Fix bypass error when device is a path --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 1 + 1 file changed, 1 insertion(+) 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 5220f47e2..87878277b 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -511,6 +511,7 @@ _intf_rule() { intf=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') [ -n "$(echo $intf | grep '@')" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') [ -z "$intf" ] && config_get intf $1 device + [ -n "$(echo $intf | grep '/') " ] && return #count=$((count+1)) config_get count $1 metric local mode From d9354767cfa2ea62b825e42b82e4f10397c644d8 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Wed, 6 Apr 2022 16:53:57 +0800 Subject: [PATCH 75/91] Update Makefile --- netifd/Makefile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/netifd/Makefile b/netifd/Makefile index 4b5f110da..2e64a6736 100644 --- a/netifd/Makefile +++ b/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2021-07-26 -PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023 -PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9 +PKG_SOURCE_DATE:=2021-01-09 +PKG_SOURCE_VERSION:=753c351bc729967a691d99e27693be5aec334028 +PKG_MIRROR_HASH:=e7d95bde520fc660d0a49e28c5bb50fff3071d7f48fe7fc3fc610f38edfc7df1 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 @@ -25,11 +25,6 @@ define Package/netifd TITLE:=OpenWrt Network Interface Configuration Daemon endef -define Package/netifd/conffiles -/etc/udhcpc.user -/etc/udhcpc.user.d/ -endef - TARGET_CFLAGS += \ -I$(STAGING_DIR)/usr/include/libnl-tiny \ -I$(STAGING_DIR)/usr/include \ @@ -45,7 +40,6 @@ define Package/netifd/install $(INSTALL_DIR) $(1)/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/ $(CP) ./files/* $(1)/ - $(INSTALL_DIR) $(1)/etc/udhcpc.user.d/ $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/ endef From b8b7de294fc1bd2a0ccfe861b076a49249d78f15 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Wed, 6 Apr 2022 16:54:29 +0800 Subject: [PATCH 76/91] Revert "Update Makefile" This reverts commit d9354767cfa2ea62b825e42b82e4f10397c644d8. --- netifd/Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/netifd/Makefile b/netifd/Makefile index 2e64a6736..4b5f110da 100644 --- a/netifd/Makefile +++ b/netifd/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2021-01-09 -PKG_SOURCE_VERSION:=753c351bc729967a691d99e27693be5aec334028 -PKG_MIRROR_HASH:=e7d95bde520fc660d0a49e28c5bb50fff3071d7f48fe7fc3fc610f38edfc7df1 +PKG_SOURCE_DATE:=2021-07-26 +PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023 +PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 @@ -25,6 +25,11 @@ define Package/netifd TITLE:=OpenWrt Network Interface Configuration Daemon endef +define Package/netifd/conffiles +/etc/udhcpc.user +/etc/udhcpc.user.d/ +endef + TARGET_CFLAGS += \ -I$(STAGING_DIR)/usr/include/libnl-tiny \ -I$(STAGING_DIR)/usr/include \ @@ -40,6 +45,7 @@ define Package/netifd/install $(INSTALL_DIR) $(1)/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/ $(CP) ./files/* $(1)/ + $(INSTALL_DIR) $(1)/etc/udhcpc.user.d/ $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/ endef From 65a593e90478563e129b4a29c41dad62411a1f1b Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 6 Apr 2022 17:34:22 +0200 Subject: [PATCH 77/91] No set VPS fw when omr-bypass not defined because it's not related --- mptcp/files/usr/share/omr/post-tracking.d/post-tracking | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 9b5e53d11..45650cf4c 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -1577,7 +1577,8 @@ if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter fi -if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then +#if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then +if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && [ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ]; then _log "Set firewall on server" /etc/init.d/openmptcprouter-vps set_vps_firewall >/dev/null 2>&1 From d525478bc0c2cd27da95348eb37111f46577ec84 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 6 Apr 2022 18:28:16 +0200 Subject: [PATCH 78/91] Add RUTX11 modem configuration --- .../files/etc/uci-defaults/1920-omr-network | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index 18726e3f0..5c0dfd8a7 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -307,7 +307,8 @@ uci -q delete network.loopback.ifname uci -q set network.loopback.device='lo' local board=$(board_name) -if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ] && [ "$(mnf_info -n)" = "RUTX1200XXXX" ]; then +if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ]; then + # Same part for RUTX12 and RUTX11, maybe other RUTX ? uci -q batch <<-EOF set network.modem1=interface set network.modem1.proto='modemmanager' @@ -332,28 +333,33 @@ if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ] && [ "$(mnf_info -n) commit firewall set network.modem2=interface set network.modem2.proto='modemmanager' - set network.modem2.apn='' - set network.modem2.auth='none' - set network.modem2.iptype='ipv4v6' - set network.modem2.addlatency='0' - set network.modem2.force_link='1' - set network.modem2.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2' - set network.wan_modem2=interface - set network.wan_modem2.proto='dhcp' - set network.wan_modem2.device='wwan1' - set network.wan_modem2.force_link='1' - set network.wan_modem2.multipath='on' - set network.wan_modem2.addlatency='0' - set network.wan_modem2.hostname='*' - set network.wan_modem2.defaultroute='0' - set network.wan_modem2.peerdns='0' - set network.wan_modem2.ip4table=wan - commit network - add_list firewall.@zone[1].network='wan_modem2' - commit firewall EOF + if [ "$(mnf_info -n)" = "RUTX1200XXXX" ] || ; then + uci -q batch <<-EOF + set network.modem2.apn='' + set network.modem2.auth='none' + set network.modem2.iptype='ipv4v6' + set network.modem2.addlatency='0' + set network.modem2.force_link='1' + set network.modem2.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2' + set network.wan_modem2=interface + set network.wan_modem2.proto='dhcp' + set network.wan_modem2.device='wwan1' + set network.wan_modem2.force_link='1' + set network.wan_modem2.multipath='on' + set network.wan_modem2.addlatency='0' + set network.wan_modem2.hostname='*' + set network.wan_modem2.defaultroute='0' + set network.wan_modem2.peerdns='0' + set network.wan_modem2.ip4table=wan + commit network + add_list firewall.@zone[1].network='wan_modem2' + commit firewall + EOF + fi fi + uci -q commit macvlan uci -q commit network rm -f /tmp/luci-indexcache From b8985b8ea814a0dbba31c6457deb5e92d0354cb0 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 7 Apr 2022 08:28:41 +0200 Subject: [PATCH 79/91] Fix config for RUTX --- openmptcprouter/files/etc/uci-defaults/1920-omr-network | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index 5c0dfd8a7..5ed5603d9 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -331,11 +331,11 @@ if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ]; then commit network add_list firewall.@zone[1].network='wan_modem1' commit firewall - set network.modem2=interface - set network.modem2.proto='modemmanager' EOF - if [ "$(mnf_info -n)" = "RUTX1200XXXX" ] || ; then + if [ "$(mnf_info -n)" = "RUTX1200XXXX" ]; then uci -q batch <<-EOF + set network.modem2=interface + set network.modem2.proto='modemmanager' set network.modem2.apn='' set network.modem2.auth='none' set network.modem2.iptype='ipv4v6' From 8b127c63677db7f349fccff57a0c7a9deba4b39d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 11 Apr 2022 20:44:13 +0200 Subject: [PATCH 80/91] Force ntp client --- openmptcprouter/files/etc/uci-defaults/2060-omr-system | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openmptcprouter/files/etc/uci-defaults/2060-omr-system b/openmptcprouter/files/etc/uci-defaults/2060-omr-system index 92e9a5fd3..aef5d9446 100755 --- a/openmptcprouter/files/etc/uci-defaults/2060-omr-system +++ b/openmptcprouter/files/etc/uci-defaults/2060-omr-system @@ -1,8 +1,15 @@ #!/bin/sh uci -q batch <<-EOF >/dev/null set system.@system[-1].ttylogin=1 + set system.ntp=timeserver set system.ntp.use_dhcp='0' set system.ntp.enable_server='1' + set system.ntp.enabled='1' + del system.ntp.server + add_list system.ntp.server='0.pool.ntp.org' + add_list system.ntp.server='1.pool.ntp.org' + add_list system.ntp.server='2.pool.ntp.org' + add_list system.ntp.server='3.pool.ntp.org' commit system set rpcd.@rpcd[0].timeout=120 commit rpcd From 2d9f9e7fa26ff33fa73fa2941bea0a6879bc1bfe Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 14 Apr 2022 19:57:01 +0200 Subject: [PATCH 81/91] Change RUTX network configuration (vlan1 & 2 are reserved) --- .../files/etc/uci-defaults/1920-omr-network | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index 5ed5603d9..a480d0d12 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -88,6 +88,34 @@ elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/c lanif="wan" elif [ -d /sys/class/net/lan ] || [ -n "$(ip link | grep ' lan')" ]; then lanif="lan" +elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.platform' | tr -d '\n')" = "RUTX" ]; then + lanif="eth1" + uci -q batch <<-EOF + set network.@switch_vlan[0]=switch_vlan + set network.@switch_vlan[0].device='switch0' + set network.@switch_vlan[0].vlan=1 + set network.@switch_vlan[0].ports='1t 2t 3t 4t 0t' + set network.@switch_vlan[1]=switch_vlan + set network.@switch_vlan[1].device='switch0' + set network.@switch_vlan[1].vlan=1 + set network.@switch_vlan[1].ports='5 0' + add network switch_vlan + set network.@switch_vlan[2].device='switch0' + set network.@switch_vlan[2].vlan=3 + set network.@switch_vlan[2].ports='0t 1' + add network switch_vlan + set network.@switch_vlan[3].device='switch0' + set network.@switch_vlan[3].vlan=4 + set network.@switch_vlan[3].ports='0t 2' + add network switch_vlan + set network.@switch_vlan[4].device='switch0' + set network.@switch_vlan[4].vlan=5 + set network.@switch_vlan[4].ports='0t 3' + add network switch_vlan + set network.@switch_vlan[5].device='switch0' + set network.@switch_vlan[5].vlan=6 + set network.@switch_vlan[5].ports='0t 4' + EOF elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d '/sys/class/net/eth1.5' ]; then lanif="eth1.5" uci -q batch <<-EOF @@ -131,6 +159,7 @@ set network.lan.proto=static set network.lan.ipaddr=192.168.100.1 set network.lan.netmask=255.255.255.0 set network.lan.device=${lanif} +set network.lan.ifname=${lanif} set network.lan.metric=2048 set network.lan.ipv6=0 set network.lan.delegate=0 @@ -181,6 +210,11 @@ if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get _setup_wan_interface wan2 eth0 on macvlan _setup_macvlan wan1 _setup_macvlan wan2 + elif [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.platform' | tr -d '\n')" = "RUTX" ]; then + _setup_wan_interface wan1 eth0.3 master + _setup_wan_interface wan2 eth0.4 on + _setup_wan_interface wan3 eth0.5 on + _setup_wan_interface wan4 eth0.6 on elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ]; then _setup_wan_interface wan1 eth0.1 master _setup_wan_interface wan2 eth0.2 on From 3e8c9b87f8800e3e42e16f371c22f28a49a70db4 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 14 Apr 2022 19:57:40 +0200 Subject: [PATCH 82/91] Add grpcurl package --- grpcurl/Makefile | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 grpcurl/Makefile diff --git a/grpcurl/Makefile b/grpcurl/Makefile new file mode 100644 index 000000000..8bec5ccf4 --- /dev/null +++ b/grpcurl/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2022 Ycarus (Yannick Chabanois) for OpenMPTCProuter +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=grpcurl +PKG_VERSION:=1.8.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=v$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/fullstorydev/grpcurl/archive/refs/tags/ +PKG_HASH:=18b457f644baabeef0de350596dd8d23563586ee94a3ed3cb290063e097ab934 + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Yannick Chabanois + +PKG_BUILD_DEPENDS:=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/fullstorydev/grpcurl +GO_PKG_BUILD_PKG:=github.com/fullstorydev/grpcurl/cmd/grpcurl +GO_PKG_LDFLAGS_X:= \ + $(GO_PKG)/constant.Version=$(PKG_VERSION) \ + $(GO_PKG)/constant.Commit=v$(PKG_VERSION) +GO_PKG_LDFLAGS:=-s -w +GO_PKG_TAGS:=master + +include $(INCLUDE_DIR)/package.mk +include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk + +define Package/grpcurl + TITLE:=grpcurl is a command-line tool that lets you interact with gRPC servers + URL:=https://github.com/fullstorydev/grpcurl + SECTION:=net + CATEGORY:=Network + DEPENDS:=$(GO_ARCH_DEPENDS) +protobuf +endef + +define Package/grpcurl/description + grpcurl is a command-line tool that lets you interact with gRPC servers. It's basically curl for gRPC servers. + + The main purpose for this tool is to invoke RPC methods on a gRPC server from the command-line. gRPC servers use a binary encoding on the wire (protocol buffers, or "protobufs" for short). So they are basically impossible to interact with using regular curl (and older versions of curl that do not support HTTP/2 are of course non-starters). This program accepts messages using JSON encoding, which is much more friendly for both humans and scripts. +endef + +define Package/v2ray-core/install + $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) + + $(INSTALL_DIR) $(1)/usr/bin + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/grpcurl $(1)/usr/bin +endef + +$(eval $(call GoBinPackage,grpcurl)) +$(eval $(call BuildPackage,grpcurl)) From 3694172044437fe5c5deaad1e6b4662d1cadbb23 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 15 Apr 2022 08:59:51 +0200 Subject: [PATCH 83/91] Fix omr-modemamanger connection type --- luci-app-openmptcprouter/root/bin/omr-modemmanager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-openmptcprouter/root/bin/omr-modemmanager b/luci-app-openmptcprouter/root/bin/omr-modemmanager index b7dc840ba..57115c2e0 100755 --- a/luci-app-openmptcprouter/root/bin/omr-modemmanager +++ b/luci-app-openmptcprouter/root/bin/omr-modemmanager @@ -10,7 +10,7 @@ timeout 1 mmcli -L | while read MODEM; do OPERATOR=$(echo "$MODEM_INFO" | grep 'modem.3gpp.operator-name ' | awk -F": " '{print $2}') NUMBER=$(echo "$MODEM_INFO" | grep 'modem.generic.own-numbders.value[1]' | awk -F": " '{print $2}') STATE=$(echo "$MODEM_INFO" | grep 'modem.generic.state ' | awk -F": " '{print $2}') - TYPE=$(echo "$MODEM_INFO" | grep 'modem.generic.access-technologies.values[1]' | awk -F": " '{print $2}') + TYPE=$(echo "$MODEM_INFO" | grep 'modem.generic.access-technologies.value\[1\]' | awk -F": " '{print $2}') [ -z "$INFO" ] && echo $PERCENT [ "$INFO" = "all" ] && echo "$PERCENT;$OPERATOR;$NUMBER;$STATE;$TYPE" exit From 98b9bcd2314ec52db67144def71a4ca4cbb9604a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 15 Apr 2022 09:00:22 +0200 Subject: [PATCH 84/91] Add RUTX12 leds support --- .../share/omr/post-tracking.d/post-tracking | 90 ++++++++++++++++++- .../files/etc/uci-defaults/2060-omr-system | 29 ++++++ 2 files changed, 118 insertions(+), 1 deletion(-) 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 45650cf4c..69c64d7b0 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -704,6 +704,95 @@ default_gw6=$(ip -6 route show default | grep -v "metric" | awk '/default/ {prin interface_up=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') + +if [ -n "$(grep RUTX /etc/board.json)" ] && [ -n "$OMR_TRACKER_INTERFACE" ]; then + if [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.device)" = "wwan0" ]; then + modemdata=$(omr-modemmanager '/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1' all) + gen=$(echo $modemdata | cut -d ';' -f 5 | tr -d '\n') + if [ "$gen" = "gsm" ]; then + echo "default-on" > /sys/class/leds/mob_gen_2/trigger + echo "none" > /sys/class/leds/mob_gen_3/trigger + echo "none" > /sys/class/leds/mob_gen_4/trigger + elif [ "$gen" = "umts" ]; then + echo "none" > /sys/class/leds/mob_gen_2/trigger + echo "default-on" > /sys/class/leds/mob_gen_3/trigger + echo "none" > /sys/class/leds/mob_gen_4/trigger + elif [ "$gen" = "lte" ]; then + echo "none" > /sys/class/leds/mob_gen_2/trigger + echo "none" > /sys/class/leds/mob_gen_3/trigger + echo "default-on" > /sys/class/leds/mob_gen_4/trigger + fi + bar=$(echo $modemdata | cut -d ';' -f 1 | tr -d '\n') + if [ "$bar" -gt "0" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_1/trigger + else + echo "none" > /sys/class/leds/mob_ssid_1/trigger + fi + if [ "$bar" -gt "30" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_2/trigger + else + echo "none" > /sys/class/leds/mob_ssid_2/trigger + fi + if [ "$bar" -gt "50" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_3/trigger + else + echo "none" > /sys/class/leds/mob_ssid_3/trigger + fi + if [ "$bar" -gt "70" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_4/trigger + else + echo "none" > /sys/class/leds/mob_ssid_4/trigger + fi + if [ "$bar" -gt "90" ]; then + echo "default-on" > /sys/class/leds/mob_ssid_5/trigger + else + echo "none" > /sys/class/leds/mob_ssid_5/trigger + fi + elif [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.device)" = "wwan1" ]; then + modemdata=$(omr-modemmanager '/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2' all) + gen=$(echo $modemdata | cut -d ';' -f 5 | tr -d '\n') + if [ "$gen" = "gsm" ]; then + echo "default-on" > /sys/class/leds/mob2_gen_2/trigger + echo "none" > /sys/class/leds/mob2_gen_3/trigger + echo "none" > /sys/class/leds/mob2_gen_4/trigger + elif [ "$gen" = "umts" ]; then + echo "none" > /sys/class/leds/mob2_gen_2/trigger + echo "default-on" > /sys/class/leds/mob2_gen_3/trigger + echo "none" > /sys/class/leds/mob2_gen_4/trigger + elif [ "$gen" = "lte" ]; then + echo "none" > /sys/class/leds/mob2_gen_2/trigger + echo "none" > /sys/class/leds/mob2_gen_3/trigger + echo "default-on" > /sys/class/leds/mob2_gen_4/trigger + fi + bar=$(echo $modemdata | cut -d ';' -f 1 | tr -d '\n') + if [ "$bar" -gt "0" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_1/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_1/trigger + fi + if [ "$bar" -gt "30" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_2/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_2/trigger + fi + if [ "$bar" -gt "50" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_3/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_3/trigger + fi + if [ "$bar" -gt "70" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_4/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_4/trigger + fi + if [ "$bar" -gt "90" ]; then + echo "default-on" > /sys/class/leds/mob2_ssid_5/trigger + else + echo "none" > /sys/class/leds/mob2_ssid_5/trigger + fi + fi +fi + # An interface in error will never be used in MPTCP if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then if [ "$interface_up" = "true" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "modemmanager" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "wireguard" ]); then @@ -1576,7 +1665,6 @@ if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter sleep 5 fi - #if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && ([ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ] || [ -z "$(iptables-save | grep omr_dst_bypass_${OMR_TRACKER_DEVICE})" ]); then if [ "$(uci -q show openmptcprouter | grep server)" != "" ] && [ "$(uci -q show openmptcprouter | grep password)" != "" ] && [ "$(pgrep openmptcprouter-vps)" = "" ] && [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" = "" ] && [ "$(uci -q show openmptcprouter | grep set_firewall=\'1\')" != "" ]; then _log "Set firewall on server" diff --git a/openmptcprouter/files/etc/uci-defaults/2060-omr-system b/openmptcprouter/files/etc/uci-defaults/2060-omr-system index aef5d9446..579452b5d 100755 --- a/openmptcprouter/files/etc/uci-defaults/2060-omr-system +++ b/openmptcprouter/files/etc/uci-defaults/2060-omr-system @@ -38,6 +38,35 @@ fi EOF } +if [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep rutx)" ]; then + uci -q batch <<-EOF >/dev/null + add system led + set system.@led[-1].sysfs='wan_wifi_4' + set system.@led[-1].name='WAN_ETH' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='eth0' + set system.@led[-1].mode='tx' 'rx' + add system led + set system.@led[-1].sysfs='wan_eth_3' + set system.@led[-1].name='WAN_WIFI' + set system.@led[-1].trigger='netdev' + set system.@led[-1].mode='tx' 'rx' + add system led + set system.@led[-1].sysfs='wan_sim_1' + set system.@led[-1].name='WAN_MODEM1' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='wwan0' + set system.@led[-1].mode='rx' + add system led + set system.@led[-1].name='WAN_MODEM2' + set system.@led[-1].sysfs='wan_sim_2' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='wwan1' + set system.@led[-1].mode='rx' + commit system + EOF +fi + #sed -i 's/^\tlogger -t/\t[ "$(uci -q get openmptcprouter.settings.debug)" = "true" ] \&\& logger -t/g' /usr/share/ModemManager/modemmanager.common exit 0 \ No newline at end of file From 31140cceec35c6467a95ce4cf00d091f86b0479d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 15 Apr 2022 10:48:19 +0200 Subject: [PATCH 85/91] Fix typo --- openmptcprouter/files/etc/uci-defaults/1920-omr-network | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index a480d0d12..c3ec17ce6 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -97,8 +97,8 @@ elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ "$(cat /etc/board.jso set network.@switch_vlan[0].ports='1t 2t 3t 4t 0t' set network.@switch_vlan[1]=switch_vlan set network.@switch_vlan[1].device='switch0' - set network.@switch_vlan[1].vlan=1 - set network.@switch_vlan[1].ports='5 0' + set network.@switch_vlan[1].vlan=2 + set network.@switch_vlan[1].ports='0 5' add network switch_vlan set network.@switch_vlan[2].device='switch0' set network.@switch_vlan[2].vlan=3 From c4c90ed46c33a4479479509b0c2c6729c3cd08f5 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 15 Apr 2022 15:24:25 +0200 Subject: [PATCH 86/91] Add wifi interfaces and wifi leds for RUTX12 --- .../files/etc/uci-defaults/1920-omr-network | 13 ++++++++++++ .../files/etc/uci-defaults/2060-omr-system | 20 +++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index c3ec17ce6..0925c70cc 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -391,6 +391,19 @@ if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ]; then commit firewall EOF fi + uci -q batch <<-EOF + set network.wifi24=interface + set network.wifi24.proto='none' + set network.wifi5=interface + set network.wifi5.proto='none' + commit network + set wireless.radio0.cell_density='0' + set wireless.default_radio0.network='wifi24' + set wireless.radio1.cell_density='0' + set wireless.default_radio1.network='wifi5' + commit wireless + EOF + fi diff --git a/openmptcprouter/files/etc/uci-defaults/2060-omr-system b/openmptcprouter/files/etc/uci-defaults/2060-omr-system index 579452b5d..4a4a37962 100755 --- a/openmptcprouter/files/etc/uci-defaults/2060-omr-system +++ b/openmptcprouter/files/etc/uci-defaults/2060-omr-system @@ -45,12 +45,14 @@ if [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep rutx)" ] set system.@led[-1].name='WAN_ETH' set system.@led[-1].trigger='netdev' set system.@led[-1].dev='eth0' - set system.@led[-1].mode='tx' 'rx' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' add system led set system.@led[-1].sysfs='wan_eth_3' set system.@led[-1].name='WAN_WIFI' set system.@led[-1].trigger='netdev' - set system.@led[-1].mode='tx' 'rx' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' add system led set system.@led[-1].sysfs='wan_sim_1' set system.@led[-1].name='WAN_MODEM1' @@ -63,6 +65,20 @@ if [ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep rutx)" ] set system.@led[-1].trigger='netdev' set system.@led[-1].dev='wwan1' set system.@led[-1].mode='rx' + add system led + set system.@led[-1].name='WIFI24' + set system.@led[-1].sysfs='wifi_gen_2' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='radio0.network1' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' + add system led + set system.@led[-1].name='WIFI5' + set system.@led[-1].sysfs='wifi_gen_5' + set system.@led[-1].trigger='netdev' + set system.@led[-1].dev='radio1.network1' + add_list system.@led[-1].mode='tx' + add_list system.@led[-1].mode='rx' commit system EOF fi From 1a8dfa260d4a2c34a767c4ce9403b0fd8549ec20 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 16 Apr 2022 17:41:13 +0200 Subject: [PATCH 87/91] Remove use of DNS for modem on RUTX --- openmptcprouter/files/etc/uci-defaults/1920-omr-network | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index 0925c70cc..a0e15b2f5 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -352,6 +352,7 @@ if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ]; then set network.modem1.addlatency='0' set network.modem1.force_link='1' set network.modem1.device='/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1' + set network.modem1.peerdns='0' set network.wan_modem1=interface set network.wan_modem1.proto='dhcp' set network.wan_modem1.device='wwan0' @@ -376,6 +377,7 @@ if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ]; then set network.modem2.addlatency='0' set network.modem2.force_link='1' set network.modem2.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2' + set network.modem2.peerdns='0' set network.wan_modem2=interface set network.wan_modem2.proto='dhcp' set network.wan_modem2.device='wwan1' From 8ef28ba4bc6eea454cbb97b1f16795d297d27ee9 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 18 Apr 2022 07:43:15 +0200 Subject: [PATCH 88/91] Update shadowsocks v2ray-plugin --- shadowsocks-v2ray-plugin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-v2ray-plugin/Makefile b/shadowsocks-v2ray-plugin/Makefile index f9e700fe1..5cc81054e 100644 --- a/shadowsocks-v2ray-plugin/Makefile +++ b/shadowsocks-v2ray-plugin/Makefile @@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git #PKG_SOURCE_URL:=https://github.com/shadowsocks/v2ray-plugin.git PKG_SOURCE_URL:=https://github.com/teddysun/v2ray-plugin.git #PKG_SOURCE_VERSION:=63a74bef9e9f639bc199255db9d452d96f01d11a -PKG_SOURCE_VERSION:=6c0c5fb15851e13b36fe2eeaaba97fd27c9d291b +PKG_SOURCE_VERSION:=5cafcf9a0ae316cb268120eb1994adf5255eb7f0 PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 From cc5c57af33ca4d09c82bfd2801856494b70c63fe Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Thu, 21 Apr 2022 21:55:00 +0200 Subject: [PATCH 89/91] Fix omr-bypass --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 87878277b..b95a0a806 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -511,7 +511,7 @@ _intf_rule() { intf=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') [ -n "$(echo $intf | grep '@')" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') [ -z "$intf" ] && config_get intf $1 device - [ -n "$(echo $intf | grep '/') " ] && return + [ -n "$(echo $intf | grep '/')" ] && return #count=$((count+1)) config_get count $1 metric local mode From dd0cd92a354625daa1c79f703fd7318e915ea62d Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 22 Apr 2022 17:13:53 +0200 Subject: [PATCH 90/91] test install workaround --- mptcp/files/usr/share/omr/post-tracking.d/post-tracking | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 69c64d7b0..5a30323f7 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -1655,7 +1655,7 @@ if [ "$(iptables-save | grep omr-bypass)" = "" ] && [ "$(pgrep omr-bypass)" = "" /etc/init.d/omr-bypass 2>&1 >/dev/null fi -if [ -f /etc/backup/installed_packages.txt ]; then +if [ -f /etc/backup/installed_packages.txt ] && [ -n "$(grep overlay /etc/backup/installed_packages.txt)" ]; then _log "Reinstall packages..." /etc/init.d/sysupgrade restart 2>&1 >/dev/null fi From 411aacefab698a15f0aa21ea582bce62b8bf4c42 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Sat, 23 Apr 2022 14:10:09 +0800 Subject: [PATCH 91/91] Delete 1920-omr-network --- .../files/etc/uci-defaults/1920-omr-network | 415 ------------------ 1 file changed, 415 deletions(-) delete mode 100755 openmptcprouter/files/etc/uci-defaults/1920-omr-network diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network deleted file mode 100755 index a0e15b2f5..000000000 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ /dev/null @@ -1,415 +0,0 @@ -#!/bin/sh -. /lib/functions.sh - -_setup_macaddr() { - uci -q get "network.$1.macaddr" >/dev/null && return - uci -q set "network.$1.macaddr=$2" -} - -_setup_macvlan() { - uci -q get "network.$1_dev.ifname" >/dev/null && return - - # do not create macvlan for vlan - local _ifname - _ifname=$(uci -q get "network.$1.device") - case "$_ifname" in - eth*.*) return ;; - esac - - uci -q batch <<-EOF - set network.$1_dev=device - set network.$1_dev.name=$1 - set network.$1_dev.type=macvlan - set network.$1_dev.ifname=$_ifname - set network.$1_dev.mode='vepa' - set network.$1.device=$1 - set network.$1.type=macvlan - set network.$1.masterintf=$_ifname - EOF - _macaddr=$(uci -q get "network.$1.macaddr") - _setup_macaddr "$1_dev" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" -} - -#_setup_macvlan_update() { -# uci -q get "network.$1_dev.device" >/dev/null || return -# -# uci -q batch <<-EOF -# set macvlan.$1=macvlan -# set macvlan.$1.device=$_ifname -# commit macvlan -# EOF -#} - -_setup_mptcp_handover_to_on() { - if [ "$(uci -q get network.$1.multipath)" = "handover" ]; then - uci -q set network.$1.multipath=on - fi - if [ "$(uci -q get openmptcprouter.$1.multipath)" = "handover" ]; then - uci -q set openmptcprouter.$1.multipath=on - fi -} - -_setup_multipath_off() { - uci -q get "network.$1.multipath" >/dev/null && return - uci -q set "network.$1.multipath=off" -} - -_setup_wan_interface() { - uci -q batch <<-EOF - set network.$1=interface - set network.$1.device=$2 - set network.$1.proto=static - set network.$1.ip4table=wan - set network.$1.multipath=$3 - set network.$1.defaultroute=0 - set network.${1}_dev=device - set network.${1}_dev.name=$2 - commit network - add_list firewall.@zone[1].network=$1 - commit firewall - EOF - [ -n "$4" ] && uci -q set network.$1.type=$4 -} - -config_load network -#config_foreach _setup_macvlan_update interface -config_foreach _setup_mptcp_handover_to_on interface - -if [ "$(uci -q show network.lan | grep multipath)" != "" ]; then - exit 0 -fi - -lanif="eth0" -if [ "$(grep rockchip /etc/os-release)" != "" ]; then - lanif="eth1" -elif [ -d /sys/class/net/lan0 -o -n "$(ip link | grep ' lan0')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then - lanif="wan" -elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then - lanif="wan" -elif [ -d /sys/class/net/lan ] || [ -n "$(ip link | grep ' lan')" ]; then - lanif="lan" -elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.platform' | tr -d '\n')" = "RUTX" ]; then - lanif="eth1" - uci -q batch <<-EOF - set network.@switch_vlan[0]=switch_vlan - set network.@switch_vlan[0].device='switch0' - set network.@switch_vlan[0].vlan=1 - set network.@switch_vlan[0].ports='1t 2t 3t 4t 0t' - set network.@switch_vlan[1]=switch_vlan - set network.@switch_vlan[1].device='switch0' - set network.@switch_vlan[1].vlan=2 - set network.@switch_vlan[1].ports='0 5' - add network switch_vlan - set network.@switch_vlan[2].device='switch0' - set network.@switch_vlan[2].vlan=3 - set network.@switch_vlan[2].ports='0t 1' - add network switch_vlan - set network.@switch_vlan[3].device='switch0' - set network.@switch_vlan[3].vlan=4 - set network.@switch_vlan[3].ports='0t 2' - add network switch_vlan - set network.@switch_vlan[4].device='switch0' - set network.@switch_vlan[4].vlan=5 - set network.@switch_vlan[4].ports='0t 3' - add network switch_vlan - set network.@switch_vlan[5].device='switch0' - set network.@switch_vlan[5].vlan=6 - set network.@switch_vlan[5].ports='0t 4' - EOF -elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d '/sys/class/net/eth1.5' ]; then - lanif="eth1.5" - uci -q batch <<-EOF - set network.@switch_vlan[0]=switch_vlan - set network.@switch_vlan[0].device='switch0' - set network.@switch_vlan[0].vlan=1 - set network.@switch_vlan[0].vid=1 - set network.@switch_vlan[0].ports='3 5t' - add network switch_vlan - set network.@switch_vlan[1].device='switch0' - set network.@switch_vlan[1].vlan=2 - set network.@switch_vlan[1].vid=2 - set network.@switch_vlan[1].ports='2 5t' - add network switch_vlan - set network.@switch_vlan[2].device='switch0' - set network.@switch_vlan[2].vlan=3 - set network.@switch_vlan[2].vid=3 - set network.@switch_vlan[2].ports='1 5t' - add network switch_vlan - set network.@switch_vlan[3].device='switch0' - set network.@switch_vlan[3].vlan=4 - set network.@switch_vlan[3].vid=4 - set network.@switch_vlan[3].ports='0 5t' - add network switch_vlan - set network.@switch_vlan[4].device='switch0' - set network.@switch_vlan[4].vlan=5 - set network.@switch_vlan[4].vid=5 - set network.@switch_vlan[4].ports='4 6t' - EOF -elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d /sys/class/net/eth1 ] && [ "$(grep ipq806x /etc/os-release)" != "" ]; then - lanif="eth0.2" -elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ] && [ -d /sys/class/net/eth1 ]; then - lanif="eth1" -elif [ ! -d /sys/class/net/eth1 ] && [ -d /sys/class/net/eth0 ]; then - lanif="eth0" -fi -uci -q batch <<-EOF -delete network.lan.type -set network.lan=interface -set network.lan.proto=static -set network.lan.ipaddr=192.168.100.1 -set network.lan.netmask=255.255.255.0 -set network.lan.device=${lanif} -set network.lan.ifname=${lanif} -set network.lan.metric=2048 -set network.lan.ipv6=0 -set network.lan.delegate=0 -EOF - -uci -q batch <<-EOF -delete network.none -delete network.wan -delete network.if6rd -reorder network.loopback=0 -reorder network.globals=1 -reorder network.lan=2 -set network.globals.multipath=enable -EOF - -# Set the ip rule for the lan with a pref of 100 -uci -q show network.lan_rule >/dev/null || \ - uci -q batch <<-EOF - set network.lan_rule=rule - set network.lan_rule.lookup=lan - set network.lan_rule.priority=100 - EOF - -if [ "$(uci -q get network.vpn0.proto)" = "none" ]; then - uci -q delete network.vpn0 -fi - -config_load network -config_foreach _setup_multipath_off interface - -# Add the lan as a named routing table -if ! grep -s -q "lan" /etc/iproute2/rt_tables; then - echo "50 lan" >> /etc/iproute2/rt_tables -fi -uci -q set network.lan.ip4table='lan' - -#uci -q set "network.lan.ip6assign=64" - -# Create WAN interfaces -if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get network.wan1.multipath)" ]; then - if [ "$(grep ipq806x /etc/os-release)" != "" ]; then - _setup_wan_interface wan1 eth1.1 master - _setup_wan_interface wan2 eth1.2 on - _setup_wan_interface wan3 eth1.3 on - _setup_wan_interface wan4 eth1.4 on - elif [ "$(grep rockchip /etc/os-release)" != "" ]; then - _setup_wan_interface wan1 eth0 master macvlan - _setup_wan_interface wan2 eth0 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - elif [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.platform' | tr -d '\n')" = "RUTX" ]; then - _setup_wan_interface wan1 eth0.3 master - _setup_wan_interface wan2 eth0.4 on - _setup_wan_interface wan3 eth0.5 on - _setup_wan_interface wan4 eth0.6 on - elif [ "$(swconfig list 2>&1 | grep switch0)" != "" ]; then - _setup_wan_interface wan1 eth0.1 master - _setup_wan_interface wan2 eth0.2 on - _setup_wan_interface wan3 eth0.3 on - _setup_wan_interface wan4 eth0.4 on - elif [ -d /sys/class/net/wan ] || [ -n "$(ip link | grep ' wan:')" ] || [ -n "$(ip link | grep ' wan@')" ]; then - if [ -d /sys/class/net/lan0 -o -n "$(ip link | grep ' lan0')" ] && [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ]; then - _setup_wan_interface wan1 lan0 master - _setup_wan_interface wan2 lan1 on - - _macaddr=$(uci -q get "network.lan0.macaddr") - _setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - _macaddr=$(uci -q get "network.lan1.macaddr") - _setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan2 ] || [ -n "$(ip link | grep ' lan2')" ]; then - _setup_wan_interface wan3 lan2 on - _macaddr=$(uci -q get "network.lan2.macaddr") - _setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan3 ] || [ -n "$(ip link | grep ' lan3')" ]; then - _setup_wan_interface wan4 lan3 on - _macaddr=$(uci -q get "network.lan3.macaddr") - _setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - fi - fi - elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/lan2 -o -n "$(ip link | grep ' lan2')" ]; then - _setup_wan_interface wan1 lan1 master - _setup_wan_interface wan2 lan2 on - - _macaddr=$(uci -q get "network.lan1.macaddr") - _setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - _macaddr=$(uci -q get "network.lan2.macaddr") - _setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan3 ] || [ -n "$(ip link | grep ' lan3')" ]; then - _setup_wan_interface wan3 lan3 on - _macaddr=$(uci -q get "network.lan3.macaddr") - _setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/lan4 ] || [ -n "$(ip link | grep ' lan4')" ]; then - _setup_wan_interface wan4 lan4 on - _macaddr=$(uci -q get "network.lan4.macaddr") - _setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - fi - fi - else - _setup_wan_interface wan1 wan master macvlan - _setup_wan_interface wan2 wan on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - elif [ -d /sys/class/net/wan1 ] || [ -n "$(ip link | grep ' wan1')" ]; then - if [ -d /sys/class/net/wan2 ] || [ -n "$(ip link | grep ' wan2')" ]; then - _setup_wan_interface wan1 wan1 master - _setup_wan_interface wan2 wan2 on - - _macaddr=$(uci -q get "network.wan1.macaddr") - _setup_macaddr "wan1" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - _macaddr=$(uci -q get "network.wan2.macaddr") - _setup_macaddr "wan2" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - - if [ -d /sys/class/net/wan3 ] || [ -n "$(ip link | grep ' wan3')" ]; then - _setup_wan_interface wan3 wan3 on - _macaddr=$(uci -q get "network.wan3.macaddr") - _setup_macaddr "wan3" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - if [ -d /sys/class/net/wan4 ] || [ -n "$(ip link | grep ' wan4')" ]; then - _setup_wan_interface wan4 wan4 on - _macaddr=$(uci -q get "network.wan4.macaddr") - _setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" - fi - fi - else - _setup_wan_interface wan1 wan1 master macvlan - _setup_wan_interface wan2 wan1 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - elif [ -d /sys/class/net/eth1 ] || [ -n "$(ip link | grep ' eth1:')" ]; then - if [ -d /sys/class/net/eth2 ] || [ -n "$(ip link | grep ' eth2:')" ]; then - _setup_wan_interface wan1 eth1 master - _setup_wan_interface wan2 eth2 on - if [ -d /sys/class/net/eth3 ] || [ -n "$(ip link | grep ' eth3:')" ]; then - _setup_wan_interface wan3 eth3 on - fi - if [ -d /sys/class/net/eth4 ] || [ -n "$(ip link | grep ' eth4:')" ]; then - _setup_wan_interface wan4 eth4 on - fi - if [ -d /sys/class/net/eth5 ] || [ -n "$(ip link | grep ' eth5:')" ]; then - _setup_wan_interface wan5 eth5 on - fi - if [ -d /sys/class/net/eth6 ] || [ -n "$(ip link | grep ' eth6:')" ]; then - _setup_wan_interface wan6 eth6 on - fi - if [ -d /sys/class/net/eth7 ] || [ -n "$(ip link | grep ' eth7:')" ]; then - _setup_wan_interface wan7 eth7 on - fi - if [ -d /sys/class/net/eth8 ] || [ -n "$(ip link | grep ' eth8:')" ]; then - _setup_wan_interface wan8 eth8 on - fi - else - _setup_wan_interface wan1 eth1 master macvlan - _setup_wan_interface wan2 eth1 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - elif [ -d /sys/class/net/eth0.1 ] && [ -d /sys/class/net/eth0.2 ]; then - _setup_wan_interface wan1 eth0.1 master - _setup_wan_interface wan2 eth0.2 on - else - _setup_wan_interface wan1 eth0 master macvlan - _setup_wan_interface wan2 eth0 on macvlan - _setup_macvlan wan1 - _setup_macvlan wan2 - fi - #uci -q batch <<-EOF - #add network route6 - #set network.@route6[-1].interface='lan' - #set network.@route6[-1].target='::/0' - #EOF -fi - -# Replace omrip to oip in config for old config -sed -i 's/omrip/oip/g' /etc/config/* - -# Fix config from ifname to device for loopback -uci -q delete network.loopback.ifname -uci -q set network.loopback.device='lo' - -local board=$(board_name) -if [ "$board" = "teltonika,rutx" ] && [ -f /sbin/mnf_info ]; then - # Same part for RUTX12 and RUTX11, maybe other RUTX ? - uci -q batch <<-EOF - set network.modem1=interface - set network.modem1.proto='modemmanager' - set network.modem1.apn='' - set network.modem1.auth='none' - set network.modem1.iptype='ipv4v6' - set network.modem1.addlatency='0' - set network.modem1.force_link='1' - set network.modem1.device='/sys/devices/platform/soc/60f8800.usb2/6000000.dwc3/xhci-hcd.1.auto/usb3/3-1' - set network.modem1.peerdns='0' - set network.wan_modem1=interface - set network.wan_modem1.proto='dhcp' - set network.wan_modem1.device='wwan0' - set network.wan_modem1.force_link='1' - set network.wan_modem1.multipath='on' - set network.wan_modem1.addlatency='0' - set network.wan_modem1.hostname='*' - set network.wan_modem1.defaultroute='0' - set network.wan_modem1.peerdns='0' - set network.wan_modem1.ip4table=wan - commit network - add_list firewall.@zone[1].network='wan_modem1' - commit firewall - EOF - if [ "$(mnf_info -n)" = "RUTX1200XXXX" ]; then - uci -q batch <<-EOF - set network.modem2=interface - set network.modem2.proto='modemmanager' - set network.modem2.apn='' - set network.modem2.auth='none' - set network.modem2.iptype='ipv4v6' - set network.modem2.addlatency='0' - set network.modem2.force_link='1' - set network.modem2.device='/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2' - set network.modem2.peerdns='0' - set network.wan_modem2=interface - set network.wan_modem2.proto='dhcp' - set network.wan_modem2.device='wwan1' - set network.wan_modem2.force_link='1' - set network.wan_modem2.multipath='on' - set network.wan_modem2.addlatency='0' - set network.wan_modem2.hostname='*' - set network.wan_modem2.defaultroute='0' - set network.wan_modem2.peerdns='0' - set network.wan_modem2.ip4table=wan - commit network - add_list firewall.@zone[1].network='wan_modem2' - commit firewall - EOF - fi - uci -q batch <<-EOF - set network.wifi24=interface - set network.wifi24.proto='none' - set network.wifi5=interface - set network.wifi5.proto='none' - commit network - set wireless.radio0.cell_density='0' - set wireless.default_radio0.network='wifi24' - set wireless.radio1.cell_density='0' - set wireless.default_radio1.network='wifi5' - commit wireless - EOF - -fi - - -uci -q commit macvlan -uci -q commit network -rm -f /tmp/luci-indexcache -exit 0