networkmanager: Add patch: reactivate GSM connection when MM reconnects
After a disconnection from network side, ModemManager can reconnect itself if the modem requests it. This commit makes sure that a reconnection of the modem makes the GSM connection active in NM. BugzID: 60029
This commit is contained in:
parent
440c447a2d
commit
7fb4bf5d51
|
|
@ -0,0 +1,61 @@
|
|||
From f7c129b1775e35f603c1c58c12f958ae81ae6bb8 Mon Sep 17 00:00:00 2001
|
||||
From: Alexandre Bard <alexandre.bard@netmodule.com>
|
||||
Date: Wed, 13 Nov 2019 17:53:54 +0100
|
||||
Subject: [PATCH] Reactivate GSM connections when ModemManager reconnects by
|
||||
itself
|
||||
|
||||
After a disconnection from network side, ModemManager can reconnect
|
||||
itself if the modem requests it. This commit makes sure that a
|
||||
reconnection of the modem makes the GSM connection active in NM.
|
||||
|
||||
BugzID: 60029
|
||||
---
|
||||
src/devices/wwan/nm-device-modem.c | 8 +++++---
|
||||
src/nm-policy.c | 5 +++++
|
||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c
|
||||
index 1e3162808..f03818599 100644
|
||||
--- a/src/devices/wwan/nm-device-modem.c
|
||||
+++ b/src/devices/wwan/nm-device-modem.c
|
||||
@@ -360,9 +360,11 @@ modem_state_cb (NMModem *modem,
|
||||
nm_device_recheck_available_connections (device);
|
||||
}
|
||||
|
||||
- nm_device_queue_recheck_available (device,
|
||||
- NM_DEVICE_STATE_REASON_MODEM_AVAILABLE,
|
||||
- NM_DEVICE_STATE_REASON_MODEM_FAILED);
|
||||
+ nm_device_recheck_available_connections (device);
|
||||
+
|
||||
+ if (new_state == NM_MODEM_STATE_CONNECTED)
|
||||
+ nm_device_emit_recheck_auto_activate(device);
|
||||
+
|
||||
}
|
||||
|
||||
static void
|
||||
diff --git a/src/nm-policy.c b/src/nm-policy.c
|
||||
index 1faba5c7b..02088bb6e 100644
|
||||
--- a/src/nm-policy.c
|
||||
+++ b/src/nm-policy.c
|
||||
@@ -1019,6 +1019,9 @@ update_ip4_routing (NMPolicy *self, gboolean force_update)
|
||||
nm_connection_get_id (nm_active_connection_get_applied_connection (best_ac)),
|
||||
ip_iface);
|
||||
_notify (self, PROP_DEFAULT_IP4_AC);
|
||||
+
|
||||
+ /* Recheck all connections to enable potential VPN depending on new route */
|
||||
+ schedule_activate_all(self);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2041,6 +2044,8 @@ device_recheck_auto_activate (NMDevice *device, gpointer user_data)
|
||||
NMPolicyPrivate *priv = user_data;
|
||||
NMPolicy *self = _PRIV_TO_SELF (priv);
|
||||
|
||||
+ /* Reset retries count */
|
||||
+ reset_autoconnect_all(self, device, FALSE);
|
||||
schedule_activate_check (self, device);
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -5,6 +5,7 @@ SRC_URI_append = "\
|
|||
file://system-connections.tar.gz \
|
||||
file://NetworkManager.conf \
|
||||
file://00-fallback-dns.conf \
|
||||
file://0001-Reactivate-GSM-connections-when-ModemManager-reconne.patch \
|
||||
"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue