mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-25 00:20:42 +02:00
modem: ensure PPP manager is always cleaned up
While this should never happen while the PPP manager is alive, modems can switch their IP method while alive, since the net port is sometimes discovered after the serial ports have been. This happens for some devices that have separate drivers for the net and serial sides, like ZTE Icera-based devices (cdc-ether and cdc-acm) and newer Sierra devices (sierra and sierra-net). Just be paranoid here and ensure that the PPP manager gets cleaned up. Partial attempt at fixing lp:752143
This commit is contained in:
parent
ee3d29107f
commit
6d9c4c64b4
1 changed files with 5 additions and 4 deletions
|
|
@ -658,12 +658,13 @@ real_deactivate (NMModem *self, NMDevice *device)
|
|||
|
||||
priv->in_bytes = priv->out_bytes = 0;
|
||||
|
||||
if (priv->ppp_manager) {
|
||||
g_object_unref (priv->ppp_manager);
|
||||
priv->ppp_manager = NULL;
|
||||
}
|
||||
|
||||
switch (priv->ip_method) {
|
||||
case MM_MODEM_IP_METHOD_PPP:
|
||||
if (priv->ppp_manager) {
|
||||
g_object_unref (priv->ppp_manager);
|
||||
priv->ppp_manager = NULL;
|
||||
}
|
||||
break;
|
||||
case MM_MODEM_IP_METHOD_STATIC:
|
||||
case MM_MODEM_IP_METHOD_DHCP:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue