openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.48k forks source link

modemmanager: corner cases where netifd interface gets out of sync w.r.t. the modem state in MM #18754

Open aleksander0m opened 2 years ago

aleksander0m commented 2 years ago

There are two main situations that would lead to an interface with protocol "modemmanager" managed in netfid getting out of sync with respect to the associated modem object state in ModemManager:

We should somehow bind the state of both processes, so that abrupt crashes of any of them don't make them get out of sync completely.

aleksander0m commented 2 years ago

jow in IRC suggested we launch some simple dummy monitor process, e.g. from the modemmanager protocol handler. This process could trap TERM signals, so that we explicitly disconnect the associated modem in modemmanager if netifd gets killed or crashes. This would solve the first issue listed in the description.

For the second one, I guess we could update the ModemManager init script so that upon boot it makes sure all interfaces with protocol "modemmanager" get reported as down by default, something like that.

Open to suggestions on how to handle all this.

aleksander0m commented 2 years ago

@nickberry17 FYI

feckert commented 8 months ago

Send a merge request upstream to the ModemManager repository that adds the monitor process suggest by @jow and implemented by @dangowrt https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1131