NetworkManager/src
Alfonso Sánchez-Beato 61b4f31d72 core/pppd-plugin: wait to recover port settings before notifying death
pppd restores the previous settings for the serial port it uses right
before exiting. It is especially important to do so because otherwise
ModemManager is not able to recover the port as it can receive a hangup
event from the port due to CLOCAL not being restored.  However, there is
currently a race condition that produces this issue. This is because
when PHASE_DEAD is notified, pppd still has not restored the port
settings - it does that a bit later, in the die() function.

This patch delays notifying PHASE_DEAD until when the exitnotify() hook
is called by pppd: when this happens the port settings have already been
restored.

There were previously efforts to fix this in commit fe090c34b7, so
PHASE_DEAD was used instead of PHASE_DISCONNECT to notify MM that the
port was disconnected, but that still early to ensure that the port
settings are restored.

The MM traces seen when the bug is triggered are:

ModemManager[2158]: <warn>  (ttyACM1): could not re-acquire serial port lock: (5) Input/output error
ModemManager[2158]: <warn>  Couldn't load Operator Code: 'Cannot run sequence: 'Could not open serial device ttyACM1: it has been forced close'

https://mail.gnome.org/archives/networkmanager-list/2019-June/msg00014.html

(cherry picked from commit a251712a72)
(cherry picked from commit 3caa065709)
2019-06-14 13:37:07 +02:00
..
devices device: reset cached route tables when starting new activation 2019-06-11 15:43:26 +02:00
dhcp build/meson: increase timeouts for some tests 2019-02-23 07:20:49 +01:00
dns dns: fix memory leak of error 2019-03-26 17:39:46 +01:00
dnsmasq all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
initrd license: re-license initrd-generator and ibft reader as LGPL 2019-02-22 21:06:00 +01:00
ndisc build/meson: increase timeouts for some tests 2019-02-23 07:20:49 +01:00
platform platform: fix nm_platform_lnk_gre_to_string() for tap links 2019-04-18 20:21:22 +02:00
ppp core/pppd-plugin: wait to recover port settings before notifying death 2019-06-14 13:37:07 +02:00
settings ifcfg-rh: use PKCS #12 private key also as client cert in reader 2019-05-28 13:49:21 +02:00
supplicant supplicant: fix setting pmf when the supplicant doesn't advertise support 2019-02-26 18:35:09 +01:00
systemd systemd: merge branch systemd into master 2019-02-20 19:18:52 +01:00
tests core: assert for valid NM_DEVICE_DEVICE_TYPE setting 2019-03-11 16:43:20 +01:00
vpn core: use nm_connection_get_setting_ip_config() helper 2019-03-05 12:23:59 +01:00
main-utils.c all: replace strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
main-utils.h
main.c all: replace g_strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
meson.build build/meson: add intermediate shared/nm-utils base library 2019-02-05 09:53:24 +01:00
NetworkManagerUtils.c core: use nm_connection_get_setting_ip_config() helper 2019-03-05 12:23:59 +01:00
NetworkManagerUtils.h core: use addr-family argument for nm_utils_get_ip_config_method() 2018-12-13 09:16:32 +01:00
nm-act-request.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-act-request.h core: pass hints as strv to nm_act_request_get_secrets() 2019-02-05 08:34:23 +01:00
nm-active-connection.c all/trivial: rename NM_UTILS_LOOKUP_STR() to have "_A" suffix 2019-01-15 09:52:01 +01:00
nm-active-connection.h core: improve and fix keeping connection active based on "connection.permissions" 2018-12-09 14:47:32 +01:00
nm-audit-manager.c all: replace strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
nm-audit-manager.h checkpoint: allow resetting the rollback timeout via D-Bus 2018-04-04 14:02:13 +02:00
nm-auth-manager.c auth-manager: use the correct function to deallocate a GError 2018-05-02 14:55:01 +02:00
nm-auth-manager.h auth-manager: add helper function nm_auth_call_result_eval() 2018-04-13 09:09:46 +02:00
nm-auth-subject.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-auth-subject.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-auth-utils.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-auth-utils.h core: add nm_auth_is_subject_in_acl_set_error() helper 2018-04-18 07:55:15 +02:00
nm-checkpoint-manager.c settings: use delegation instead of inheritance for NMSettingsConnection and NMConnection 2018-08-28 22:27:55 +02:00
nm-checkpoint-manager.h checkpoint: allow resetting the rollback timeout via D-Bus 2018-04-04 14:02:13 +02:00
nm-checkpoint.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-checkpoint.h checkpoint: allow resetting the rollback timeout via D-Bus 2018-04-04 14:02:13 +02:00
nm-config-data.c all: cache errno in local variable before using it 2019-02-12 08:50:28 +01:00
nm-config-data.h core: add checks on connection default properties 2018-12-01 15:16:48 +01:00
nm-config.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-config.h build: check that the list of supported config options is up to date 2018-12-01 15:16:48 +01:00
nm-connectivity.c connectivity: fix build with --disable-concheck 2019-04-10 21:26:20 +02:00
nm-connectivity.h libnm: add nm_connectivity_state_cmp() helper 2018-12-11 09:23:47 +01:00
nm-core-utils.c core: fix file permissions for "/var/lib/NetworkManager/secret_key" 2019-05-14 14:04:51 +02:00
nm-core-utils.h policy: treat WireGuard devices as VPN for DNS 2019-02-14 08:00:29 +01:00
nm-dbus-manager.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-dbus-manager.h dbus: add nm_dbus_manager_get_dbus_connection() helper 2018-12-11 09:23:47 +01:00
nm-dbus-object.c core/dbus: stop NMDBusManager and reject future method calls 2018-04-24 10:25:26 +02:00
nm-dbus-object.h core/dbus: stop NMDBusManager and reject future method calls 2018-04-24 10:25:26 +02:00
nm-dbus-utils.c core: don't explicitly set D-Bus path properties to "/" 2018-04-18 07:55:15 +02:00
nm-dbus-utils.h core/dbus: stop NMDBusManager and reject future method calls 2018-04-24 10:25:26 +02:00
nm-dcb.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-dcb.h
nm-dhcp4-config.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-dhcp4-config.h
nm-dhcp6-config.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-dhcp6-config.h
nm-dispatcher.c all: replace strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
nm-dispatcher.h all: remove consecutive empty lines 2018-04-30 16:24:52 +02:00
nm-firewall-manager.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-firewall-manager.h
nm-hostname-manager.c hostname-manager: use fqdn for persistent hostname on Slackware 2019-05-19 10:48:32 +02:00
nm-hostname-manager.h
nm-iface-helper.c all: replace strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
nm-ip4-config.c core: allow ignoring addresses when intersecting ip configs 2019-03-11 10:31:29 +01:00
nm-ip4-config.h core: allow ignoring addresses when intersecting ip configs 2019-03-11 10:31:29 +01:00
nm-ip6-config.c core: allow ignoring addresses when intersecting ip configs 2019-03-11 10:31:29 +01:00
nm-ip6-config.h core: allow ignoring addresses when intersecting ip configs 2019-03-11 10:31:29 +01:00
nm-keep-alive.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-keep-alive.h keep-alive: drop unused nm_keep_alive_set_forced() 2018-12-09 14:47:31 +01:00
nm-logging.c all: codespell fixes 2019-03-11 12:03:46 +01:00
nm-logging.h logging: make nm-logging thread-safe 2019-02-05 08:18:08 +01:00
nm-manager.c manager: ignore ovs-system master when assuming connections 2019-03-04 10:48:19 +01:00
nm-manager.h core: improve and fix keeping connection active based on "connection.permissions" 2018-12-09 14:47:32 +01:00
nm-netns.c all: get rid of a handful of unused-but-set variables 2017-12-18 13:29:32 +01:00
nm-netns.h core: rework handling of default-routes and drop NMDefaultRouteManager 2017-09-08 11:11:21 +02:00
nm-pacrunner-manager.c all: don't use static buffer for nm_utils_inet*_ntop() 2018-12-19 09:23:08 +01:00
nm-pacrunner-manager.h
nm-policy.c policy: fix memory leak 2019-04-12 11:52:25 +02:00
nm-policy.h policy: track best active connections rather than best devices 2018-07-09 14:56:59 +02:00
nm-proxy-config.c
nm-proxy-config.h
nm-rfkill-manager.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-rfkill-manager.h
nm-session-monitor.c all: replace strerror() calls with nm_strerror_native() 2019-02-12 08:50:28 +01:00
nm-session-monitor.h
nm-sleep-monitor.c all: drop unnecessary includes of <errno.h> and <string.h> 2019-02-12 08:50:28 +01:00
nm-sleep-monitor.h
nm-test-utils-core.h build: avoid header conflict for <linux/if.h> and <net/if.h> with "nm-platform.h" 2018-11-12 16:02:35 +01:00
nm-types.h wifi-p2p: rename Wi-Fi P2P 2019-02-01 17:02:57 +01:00
org.freedesktop.NetworkManager.conf wifi-p2p: rename Wi-Fi P2P 2019-02-01 17:02:57 +01:00