mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
sync (#474)
This commit is contained in:
commit
dbb4d843bb
4 changed files with 14 additions and 2 deletions
|
@ -130,6 +130,7 @@ _check_master() {
|
||||||
[ "$master" = "1" ] && [ -n "$ip" ] && [ "$disabled" != "1" ] && {
|
[ "$master" = "1" ] && [ -n "$ip" ] && [ "$disabled" != "1" ] && {
|
||||||
check_ip() {
|
check_ip() {
|
||||||
local ipd=$1
|
local ipd=$1
|
||||||
|
[ -n "$serverip" ] && [ "$server_ping" = true ] && return
|
||||||
ipresolve="$(resolveip -4 $ipd | head -n 1)"
|
ipresolve="$(resolveip -4 $ipd | head -n 1)"
|
||||||
if [ -n "$ipresolve" ]; then
|
if [ -n "$ipresolve" ]; then
|
||||||
serverip="$ipresolve"
|
serverip="$ipresolve"
|
||||||
|
@ -282,6 +283,7 @@ _check_backup() {
|
||||||
[ "$backup" = "1" ] && [ -n "$ip" ] && [ "$disabled" != "1" ] && {
|
[ "$backup" = "1" ] && [ -n "$ip" ] && [ "$disabled" != "1" ] && {
|
||||||
check_ip() {
|
check_ip() {
|
||||||
local ipd=$1
|
local ipd=$1
|
||||||
|
[ -n "$serverip" ] && [ "$server_ping" = true ] && return
|
||||||
ipresolve="$(resolveip -4 $ipd | head -n 1)"
|
ipresolve="$(resolveip -4 $ipd | head -n 1)"
|
||||||
if [ -n "$ipresolve" ]; then
|
if [ -n "$ipresolve" ]; then
|
||||||
serverip="$ipresolve"
|
serverip="$ipresolve"
|
||||||
|
|
|
@ -1048,6 +1048,9 @@ function interfaces_status()
|
||||||
if peer == "" then
|
if peer == "" then
|
||||||
peer = ut.trim(sys.exec("ip -4 r list dev " .. tun_dev .. " | grep kernel | awk '/proto kernel/ {print $1}' | grep -v / | tr -d '\n'"))
|
peer = ut.trim(sys.exec("ip -4 r list dev " .. tun_dev .. " | grep kernel | awk '/proto kernel/ {print $1}' | grep -v / | tr -d '\n'"))
|
||||||
end
|
end
|
||||||
|
if peer == "" then
|
||||||
|
peer = ut.trim(sys.exec("ip -4 r list dev " .. tun_dev .. " | grep -m 1 default | awk '/default via/ {print $3}' | grep -v / | tr -d '\n'"))
|
||||||
|
end
|
||||||
if peer ~= "" then
|
if peer ~= "" then
|
||||||
local tunnel_ping_test = ut.trim(sys.exec("ping -w 1 -c 1 -I " .. tun_dev .. " " .. peer .. " | grep '100% packet loss'"))
|
local tunnel_ping_test = ut.trim(sys.exec("ping -w 1 -c 1 -I " .. tun_dev .. " " .. peer .. " | grep '100% packet loss'"))
|
||||||
if tunnel_ping_test == "" then
|
if tunnel_ping_test == "" then
|
||||||
|
|
|
@ -78,9 +78,9 @@ MY_DEPENDS := \
|
||||||
!TARGET_mvebu:umbim !TARGET_mvebu:kmod-mii !TARGET_mvebu:kmod-usb-net !TARGET_mvebu:kmod-usb-wdm !TARGET_mvebu:kmod-usb-net-qmi-wwan !TARGET_mvebu:kmod-usb-net-cdc-mbim !TARGET_mvebu:umbim \
|
!TARGET_mvebu:umbim !TARGET_mvebu:kmod-mii !TARGET_mvebu:kmod-usb-net !TARGET_mvebu:kmod-usb-wdm !TARGET_mvebu:kmod-usb-net-qmi-wwan !TARGET_mvebu:kmod-usb-net-cdc-mbim !TARGET_mvebu:umbim \
|
||||||
!(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-huawei-cdc-ncm !(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-rndis !(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-cdc-ether !(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-ipheth !(TARGET_mvebu||TARGET_ipq40xx):usbmuxd !(TARGET_mvebu||TARGET_ipq40xx):libusbmuxd \
|
!(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-huawei-cdc-ncm !(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-rndis !(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-cdc-ether !(TARGET_mvebu||TARGET_ipq40xx):kmod-usb-net-ipheth !(TARGET_mvebu||TARGET_ipq40xx):usbmuxd !(TARGET_mvebu||TARGET_ipq40xx):libusbmuxd \
|
||||||
!TARGET_ipq40xx:kmod-rt2800-usb !TARGET_ipq40xx:kmod-rtl8xxxu !TARGET_ipq40xx:kmod-rtl8192cu !TARGET_ipq40xx:kmod-net-rtl8192su !LINUX_6_1:kmod-rtl8812au-ct \
|
!TARGET_ipq40xx:kmod-rt2800-usb !TARGET_ipq40xx:kmod-rtl8xxxu !TARGET_ipq40xx:kmod-rtl8192cu !TARGET_ipq40xx:kmod-net-rtl8192su !LINUX_6_1:kmod-rtl8812au-ct \
|
||||||
!TARGET_mvebu:luci-proto-qmi wpad-basic !TARGET_ipq40xx:kmod-mt7601u !TARGET_ipq40xx:kmod-rtl8187 TARGET_r4s:kmod-r8168 (TARGET_x86||TARGET_x86_64):kmod-usb-net-rtl8152 \
|
!TARGET_mvebu:luci-proto-qmi wpad-basic !(TARGET_ipq40xx||TARGET_x86_64):kmod-mt7601u !TARGET_ipq40xx:kmod-rtl8187 TARGET_r4s:kmod-r8168 (TARGET_x86||TARGET_x86_64):kmod-usb-net-rtl8152 \
|
||||||
!TARGET_mvebu:luci-app-mlvpn !TARGET_mvebu:mlvpn 464xlat kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang iptables-mod-ipopt igmpproxy ss iptraf-ng \
|
!TARGET_mvebu:luci-app-mlvpn !TARGET_mvebu:mlvpn 464xlat kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang iptables-mod-ipopt igmpproxy ss iptraf-ng \
|
||||||
luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-openssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf (TARGET_x86||TARGET_x86_64):kmod-igbvf \
|
luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu !TARGET_x86_64:kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-openssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf (TARGET_x86||TARGET_x86_64):kmod-igbvf \
|
||||||
hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding luci-app-sysupgrade \
|
hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding luci-app-sysupgrade \
|
||||||
luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard kmod-crypto-lib-blake2s (TARGET_x86||TARGET_x86_64):kmod-r8125 \
|
luci-theme-openwrt-2020 luci-proto-wireguard luci-app-wireguard kmod-crypto-lib-blake2s (TARGET_x86||TARGET_x86_64):kmod-r8125 \
|
||||||
!(LINUX_5_4):mptcpd (TARGET_x86||TARGET_x86_64):kmod-igc !TARGET_mvebu:kmod-mmc-spi kmod-macsec usbutils v2ray-core LINUX_5_4:v2ray-config !LINUX_5_4:v2ray-config-nft syslogd \
|
!(LINUX_5_4):mptcpd (TARGET_x86||TARGET_x86_64):kmod-igc !TARGET_mvebu:kmod-mmc-spi kmod-macsec usbutils v2ray-core LINUX_5_4:v2ray-config !LINUX_5_4:v2ray-config-nft syslogd \
|
||||||
|
|
|
@ -91,6 +91,13 @@ _fix_metrics() {
|
||||||
config_load openmptcprouter
|
config_load openmptcprouter
|
||||||
config_foreach _fix_metrics interface
|
config_foreach _fix_metrics interface
|
||||||
|
|
||||||
|
if [ -z "$(uci -q get network.globals.packet_steering)" ]; then
|
||||||
|
uci -q batch <<-EOF
|
||||||
|
set network.globals.packet_steering="0"
|
||||||
|
commit network
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$(uci -q show network.lan | grep multipath)" != "" ]; then
|
if [ "$(uci -q show network.lan | grep multipath)" != "" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue