NetworkManager/src/devices
Aleksander Morgado fe090c34b7 wwan: wait for pppd to exit before relaying the port to ModemManager
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]
2015-01-21 18:36:00 -06:00
..
adsl core: fix a spurious warning with non-kernel network devices 2014-11-14 15:36:31 -05:00
bluetooth bluetooth: the code cannot be reached 2014-12-05 09:38:40 +01:00
team core: add nm_utils_setpgid(), and use it 2015-01-19 11:29:13 -05:00
wifi wifi: set wireless powersave for nl80211 devices when activated 2015-01-21 14:31:14 -06:00
wimax all: consistently include config.h 2014-11-13 17:18:42 -05:00
wwan wwan: wait for pppd to exit before relaying the port to ModemManager 2015-01-21 18:36:00 -06:00
nm-device-bond.c bond: allow overriding the MTU 2015-01-14 18:44:20 +01:00
nm-device-bond.h devices: drop device-type-specific error domains 2014-10-22 08:29:08 -04:00
nm-device-bridge.c libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-device-bridge.h devices: drop device-type-specific error domains 2014-10-22 08:29:08 -04:00
nm-device-ethernet-utils.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-ethernet-utils.h settings: create default wired connection from NMDeviceEthernet 2014-09-11 12:47:07 -05:00
nm-device-ethernet.c core: declare nm_supplicant_manager_get() using NM_DEFINE_SINGLETON_GETTER() 2015-01-12 12:10:03 +01:00
nm-device-ethernet.h devices: drop device-type-specific error domains 2014-10-22 08:29:08 -04:00
nm-device-factory.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
nm-device-factory.h core: add support for internal device factories 2014-09-11 12:50:15 -05:00
nm-device-generic.c libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-device-generic.h devices: drop device-type-specific error domains 2014-10-22 08:29:08 -04:00
nm-device-gre.c libnm-core: extract NMSettingIPConfig superclass out of IP4, IP6 classes 2014-11-07 07:49:40 -05:00
nm-device-gre.h gre: port to internal device factory 2014-09-11 12:50:16 -05:00
nm-device-infiniband.c libnm-core: add nm-core-types.h, remove cross-includes 2014-10-28 17:17:17 -04:00
nm-device-infiniband.h devices: drop device-type-specific error domains 2014-10-22 08:29:08 -04:00
nm-device-logging.h device: add logging macro _LOGT() 2014-12-09 16:17:46 +01:00
nm-device-macvlan.c macvlan: port to internal device factory 2014-09-11 12:50:16 -05:00
nm-device-macvlan.h macvlan: port to internal device factory 2014-09-11 12:50:16 -05:00
nm-device-private.h device: turn nm_d_ip_config_should_fail to get_ip_config_may_fail 2014-12-11 11:46:42 +01:00
nm-device-tun.c core: fix 'tun' device owner/group property getters 2014-09-19 12:07:00 -05:00
nm-device-tun.h tun: port to internal device factory 2014-09-11 12:50:17 -05:00
nm-device-veth.c veth: port to internal device factory 2014-09-11 12:50:16 -05:00
nm-device-veth.h veth: port to internal device factory 2014-09-11 12:50:16 -05:00
nm-device-vlan.c device: Deal with links that vanish during initialization 2014-12-02 11:44:49 +01:00
nm-device-vlan.h vlan: export parent device for VLANs as D-Bus property 2014-11-24 10:33:13 +01:00
nm-device-vxlan.c vxlan: port to internal device factory 2014-09-11 12:50:16 -05:00
nm-device-vxlan.h vxlan: port to internal device factory 2014-09-11 12:50:16 -05:00
nm-device.c device: new deactivate_async() method to be run during DEACTIVATING phase 2015-01-21 17:58:50 -06:00
nm-device.h device: new deactivate_async() method to be run during DEACTIVATING phase 2015-01-21 17:58:50 -06:00