From: Florian Eckert Date: Tue, 5 Mar 2024 13:58:33 +0000 (+0100) Subject: modemmanager: reconnect interface if the modemmanager detects a disconnect X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=77c16abb1a3021bba0db97cb4349e906c9bb6ecb;p=feed%2Fpackages.git modemmanager: reconnect interface if the modemmanager detects a disconnect There are situation for mobile routers, that the modemmanager can not stay connected to the mobile network. There can have various reasons. In order for the system to reconnect automatically, the netifd must be informed that it must re-establish the connection. The modem manager already does have a script callback handling which is already used by the modemmanager in openwrt. Currently the modem is marked as not unavailable when a disconnected event is detected. The behavior was changed with this commit, so that a reconnect of the interface is now triggerd via the netifd if the modem disconnects. Signed-off-by: Florian Eckert --- diff --git a/net/modemmanager/Makefile b/net/modemmanager/Makefile index 97f8dce06a..8759cd4054 100644 --- a/net/modemmanager/Makefile +++ b/net/modemmanager/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modemmanager PKG_SOURCE_VERSION:=1.22.0 -PKG_RELEASE:=11 +PKG_RELEASE:=12 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git diff --git a/net/modemmanager/files/usr/lib/ModemManager/connection.d/10-report-down b/net/modemmanager/files/usr/lib/ModemManager/connection.d/10-report-down index 0ebe87de52..b8feb26779 100644 --- a/net/modemmanager/files/usr/lib/ModemManager/connection.d/10-report-down +++ b/net/modemmanager/files/usr/lib/ModemManager/connection.d/10-report-down @@ -31,9 +31,9 @@ CFG=$(mm_get_modem_config "${MODEM_DEVICE}") IFUP=$(ifstatus "${CFG}" | jsonfilter -e "@.up") [ "${IFUP}" = "true" ] && { - logger -t "modemmanager" "interface ${CFG} (network device ${INTERFACE}) ${STATE}" - proto_init_update $INTERFACE 0 - proto_send_update $CFG + mm_log "info" "Reconnecting '${CFG}' on '${STATE}' event" + ubus call network.interface down "{ 'interface': '${CFG}'}" + ubus call network.interface up "{ 'interface': '${CFG}'}" } exit 0