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 <fe@dev.tdt.de>
This commit is contained in:
parent
cf4df28d06
commit
77c16abb1a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue