• Aleksander Morgado's avatar
    wwan: wait for pppd to exit before relaying the port to ModemManager · fe090c34
    Aleksander Morgado authored
    ModemManager needs to have CLOCAL set in the TTY termios configuration, in order
    to notify the kernel that modem control lines are not in effect (e.g. so that a
    transition to LOW in the DCD input control line doesn't trigger a hangup in the
    TTY).
    
    pppd in the other hand, needs CLOCAL unset in order to have proper modem control
    lines in effect during the PPP session. So, when pppd starts it will store the
    original termios settings, and before exiting it will restore the original
    settings in the TTY. In other words, if CLOCAL was set before launching pppd,
    CLOCAL will be also set after pppd exits.
    
    Now, in order for this sequence to work correctly, NetworkManager also needs to
    make sure that ModemManager is notified about the disconnection only after pppd
    has really finished re-configuring the TTY.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734347
    
    ----------------------
    
    Once the patch is applied, we will be making sure that ModemManager is only
    notified about the disconnection AFTER pppd has fully exited:
        NetworkManager[27589]: <info>  (ttyUSB2): device state change: activated -> deactivating (reason 'user-requested') [100 110 39]
        Terminating on signal 15
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate'
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 8 / phase 'network'
        Connect time 0.3 minutes.
        Sent 56 bytes, received 0 bytes.
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 11 / phase 'disconnect'
        Connection terminated.
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 1 / phase 'dead'
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_exit_notify): cleaning up
        NetworkManager[27589]: <warn>  pppd pid 27617 exited with error: pppd received a signal
        NetworkManager[27589]: <info>  (ttyUSB2): modem state changed, 'connected' --> 'disconnecting' (reason: user-requested)
        NetworkManager[27589]: <info>  (ttyUSB2): modem state changed, 'disconnecting' --> 'registered' (reason: user-requested)
        NetworkManager[27589]: <info>  (ttyUSB2) modem deactivation finished
        NetworkManager[27589]: <info>  (ttyUSB2): device state change: deactivating -> disconnected (reason 'user-requested') [110 30 39]
        NetworkManager[27589]: <info>  (ttyUSB2): deactivating device (reason 'user-requested') [39]
    fe090c34
Name
Last commit
Last update
callouts Loading commit data...
clients Loading commit data...
contrib/fedora Loading commit data...
data Loading commit data...
docs Loading commit data...
examples Loading commit data...
include Loading commit data...
initscript Loading commit data...
introspection Loading commit data...
libnm Loading commit data...
libnm-core Loading commit data...
libnm-glib Loading commit data...
libnm-util Loading commit data...
m4 Loading commit data...
man Loading commit data...
po Loading commit data...
policy Loading commit data...
src Loading commit data...
tools Loading commit data...
vapi Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
Makefile.glib Loading commit data...
NEWS Loading commit data...
NetworkManager.pc.in Loading commit data...
README Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
valgrind.suppressions Loading commit data...