Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync #480

Merged
merged 12 commits into from
May 3, 2024
4 changes: 2 additions & 2 deletions libmbim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=libmbim
PKG_SOURCE_VERSION:=1.31.2-dev
PKG_SOURCE_VERSION:=1.31.3-dev
#PKG_SOURCE_VERSION:=1.30.0
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libmbim.git
#PKG_MIRROR_HASH:=8fc4e2d78d6a1003bf89303d3ce779283b176d74e84a241ba8efb0d468605268
#libmPKG_MIRROR_HASH:=8fc4e2d78d6a1003bf89303d3ce779283b176d74e84a241ba8efb0d468605268

PKG_BUILD_FLAGS:=gc-sections

Expand Down
2 changes: 1 addition & 1 deletion libqmi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libqmi
#PKG_SOURCE_VERSION:=1.34.0
PKG_SOURCE_VERSION:=1.35.2-dev
PKG_SOURCE_VERSION:=1.35.3-dev
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ return view.extend({
.map(function(s) { return s['.name']; });
};

s.handleAdd = function(ev) {
this.sectiontype = 'interface';
var promise = form.GridSection.prototype.handleAdd.apply(this, arguments);
this.sectiontype = undefined;
return promise;
};

o = s.option(form.Flag, 'enabled', _('Enabled'));
o.default = false;

Expand All @@ -54,13 +61,13 @@ return view.extend({

o = s.option(form.DynamicList, 'hosts', _('Tracking hostname or IP address'),
_('This hostname or IP address will be pinged to determine if the link is up or down. Leave blank to use defaults settings.'));
o.datatype = 'hosts';
//o.datatype = 'hosts';
o.modalonly = true;
o.rmempty = false;

o = s.option(form.DynamicList, 'hosts6', _('Tracking hostname or IP address for IPv6'),
_('This hostname or IP address will be pinged to determine if the link is up or down. Leave blank to use defaults settings.'));
o.datatype = 'hosts';
//o.datatype = 'hosts';
o.modalonly = true;
o.depends('family', 'ipv4ipv6');
o.depends('family', 'ipv6');
Expand Down
2 changes: 1 addition & 1 deletion modemmanager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=modemmanager
PKG_SOURCE_VERSION:=1.23.5-dev
PKG_SOURCE_VERSION:=1.23.6-dev
PKG_RELEASE:=20

PKG_SOURCE_PROTO:=git
Expand Down
3 changes: 2 additions & 1 deletion modemmanager/files/etc/init.d/modemmanager
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ start_service() {
procd_open_instance "service"
procd_set_param command /usr/sbin/ModemManager-wrapper
procd_append_param command --log-level="$LOG_LEVEL"
[ "$LOG_LEVEL" = "DEBUG" ] && procd_append_param command --debug
#[ "$LOG_LEVEL" = "DEBUG" ] && procd_append_param command --debug
procd_append_param command --debug
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
procd_set_param pidfile "${MODEMMANAGER_PID_FILE}"
procd_close_instance
Expand Down
18 changes: 10 additions & 8 deletions mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking
Original file line number Diff line number Diff line change
Expand Up @@ -734,14 +734,15 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || ([ "$OMR_TRACKER_INTERFACE" != "omrvpn
interface_error=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["errors"][0].code')

#if [ "$interface_available" = "true" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "modemmanager" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "wireguard" ]) && [ "$interface_error" != "MM_PINCODE_REQUIRED" ] && [ "$interface_error" != "MM_FAILED_REASON_SIM_MISSING" ]; then
# _log "No answer from $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE), restart interface"
# _log "Set $OMR_TRACKER_INTERFACE down"
# ifdown $OMR_TRACKER_INTERFACE
# sleep 5
# _log "Set $OMR_TRACKER_INTERFACE up"
# ifup $OMR_TRACKER_INTERFACE
# sleep 30
if [ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "modemmanager" ] && [ "$interface_up" = "false" ] && [ "$interface_available" = "false" ] && [ "$interface_pending" = "false" ] && [ "$interface_autostart" = "true" ]; then
if [ "$interface_available" = "true" ] && [ "$interface_up" = "false" ] && [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "modemmanager" ] || [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "wireguard" ]); then
_log "No answer from $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE), restart interface"
_log "Set $OMR_TRACKER_INTERFACE down"
ifdown $OMR_TRACKER_INTERFACE
sleep 5
_log "Set $OMR_TRACKER_INTERFACE up"
ifup $OMR_TRACKER_INTERFACE
sleep 30
elif [ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "modemmanager" ] && [ "$interface_up" = "false" ] && [ "$interface_available" = "false" ] && [ "$interface_pending" = "false" ] && [ "$interface_autostart" = "true" ]; then
modemfind="0"
for modem in $(timeout 3 mmcli -L | awk -F/ '{ print $6}' | awk '{print $1}'); do
modeminfo="$(timeout 2 mmcli -m $modem -K)"
Expand Down Expand Up @@ -1067,6 +1068,7 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_DEVICE" ]; then
if [ -z "$metric" ] || ([ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -z "$(ip route show table $metric | grep $OMR_TRACKER_DEVICE)" ]) || ([ -n "$OMR_TRACKER_DEVICE_IP6" ] && [ -z "$(ip -6 route show table 6${metric} | grep $OMR_TRACKER_DEVICE)" ]); then
_log "Routes not correctly set for $OMR_TRACKER_INTERFACE ($OMR_TRACKER_DEVICE table $metric) with IPs $OMR_TRACKER_DEVICE_IP $OMR_TRACKER_DEVICE_IP6"
/etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE"
/etc/init.d/omr-tracker restart
fi
fi

Expand Down
8 changes: 4 additions & 4 deletions omr-schedule/files/usr/share/omr/schedule.d/010-services
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ if [ -f /etc/init.d/unbound ] && [ "$(uci -q get unbound.@unbound[0].enabled)" =
_log "Can't find unbound, restart it..."
/etc/init.d/unbound restart 2>&1 >/dev/null
sleep 5
# elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ "$(uci -q get unbound.ub_main.listen_port)" = "5353" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com -p 5353 | grep 'ANSWER: 0')" ]; then
# _log "Can't resolve via unbound, restart it..."
# /etc/init.d/unbound restart 2>&1 >/dev/null
# sleep 5
elif [ "$(uci -q get openmptcprouter.settings.external_check)" != "0" ] && [ "$(uci -q get unbound.ub_main.listen_port)" = "5353" ] && [ -n "$(dig +timeout=4 +tries=1 openmptcprouter.com -p 5353 | grep 'ANSWER: 0')" ]; then
_log "Can't resolve via unbound, restart it..."
/etc/init.d/unbound restart 2>&1 >/dev/null
sleep 5
fi
fi

Expand Down
1 change: 1 addition & 0 deletions omr-schedule/files/usr/share/omr/schedule.d/030-bypass
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

[ ! -e /etc/init.d/omr-bypass ] && exit 0
bypassipvs4s=$(ipset -o save list omr_dst_bypass_srv_vpn1_4 2>/dev/null)
[ -z "$bypassipvs4s" ] && {
ipv4set=$(nft -j list set inet fw4 "omr_dst_bypass_srv_vpn1_4" 2>/dev/null)
Expand Down
2 changes: 2 additions & 0 deletions omr-tracker/files/bin/omr-tracker
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ while true; do
[ -z "$OMR_TRACKER_DEVICE_GATEWAY" ] && OMR_TRACKER_STATUS_MSG="$OMR_TRACKER_STATUS_MSG, interface have no IPv4 gateway"
[ "$OMR_TRACKER_IPV6" != "0" ] && [ -z "$OMR_TRACKER_DEVICE_IP6" ] && OMR_TRACKER_STATUS_MSG="$OMR_TRACKER_STATUS_MSG, interface have no IPv6"
[ "$OMR_TRACKER_IPV6" != "0" ] && [ -z "$OMR_TRACKER_DEVICE_GATEWAY6" ] && OMR_TRACKER_STATUS_MSG="$OMR_TRACKER_STATUS_MSG, interface have no IPv6 gateway"
elif [ "$OMR_TRACKER_STATUS" = "ERROR" ] && [ -z "$OMR_TRACKER_STATUS_MSG" ]; then
OMR_TRACKER_STATUS_MSG="No IP & Gateway detected for $OMR_TRACKER_INTERFACE"
fi
else
OMR_TRACKER_STATUS_MSG="link down"
Expand Down
8 changes: 8 additions & 0 deletions omr-tracker/files/etc/config/omr-tracker
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ config defaults 'defaults'
list hosts '80.67.169.40'
list hosts '114.114.114.114'
list hosts '1.1.1.1'
list hosts '208.67.222.222'
list hosts '208.67.222.220'
list hosts6 '2606:4700:4700::1111'
list hosts6 '2606:4700:4700::1001'
list hosts6 '2620:fe::fe'
list hosts6 '2620:fe::9'
list hosts6 '2001:4860:4860::8888'
list hosts6 '2001:4860:4860::8844'
list hosts6 '2620:119:35::35'
list hosts6 '2620:119:53::53'
option timeout '2'
option count '2'
option tries '3'
Expand All @@ -43,6 +47,10 @@ config proxy 'proxy'
list hosts '1.1.1.1'
list hosts '74.82.42.42'
list hosts '176.103.130.130'
list hosts6 '2606:4700:4700::1111'
list hosts6 '2606:4700:4700::1001'
list hosts6 '2620:119:35::35'
list hosts6 '2620:119:53::53'
option timeout '10'
option tries '3'
option wait_test '0'
Expand Down
9 changes: 9 additions & 0 deletions omr-tracker/files/etc/uci-defaults/omr-tracker
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ if [ -z "$(uci -q get omr-tracker.defaults.hosts6)" ]; then
commit omr-tracker
EOF
fi
if [ -z "$(uci -q get omr-tracker.proxy.hosts6)" ]; then
uci -q batch <<-EOF >/dev/null
add_list omr-tracker.proxy.hosts6='2606:4700:4700::1111'
add_list omr-tracker.proxy.hosts6='2606:4700:4700::1001'
add_list omr-tracker.proxy.hosts6='2620:119:35::35'
add_list omr-tracker.proxy.hosts6='2620:119:53::53'
commit omr-tracker
EOF
fi

if [ "$(uci -q get omr-tracker.defaults.wait_test)" = "" ]; then
uci -q batch <<-EOF >/dev/null
Expand Down
3 changes: 3 additions & 0 deletions openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,9 @@ function interfaces_status()
elseif gateway6 ~= "" then
serverip = sys.exec('resolveip -6 ' .. value .. ' | head -n 1')
end
if serverip == "" then
serverip = value
end
if serverip ~= "" then
local server_ping_test = sys.exec("ping -B -w 1 -c 1 -I " .. ifname .. " " .. serverip)
local server_ping_result = ut.trim(sys.exec("echo '" .. server_ping_test .. "' | grep '100% packet loss'"))
Expand Down