mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 10:18:00 +02:00
device: don't leave dhclient running upon device removal
Leaving processes behind is a no-no for early boot, but probably a wrong thing to do in any other cases either.
This commit is contained in:
parent
55d24ba94e
commit
47b877a7a6
1 changed files with 9 additions and 5 deletions
|
|
@ -5042,11 +5042,15 @@ nm_device_removed (NMDevice *self, gboolean unconfigure_ip_config)
|
|||
nm_device_master_release_one_slave (priv->master, self, FALSE, NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED);
|
||||
}
|
||||
|
||||
if (!unconfigure_ip_config)
|
||||
return;
|
||||
|
||||
nm_device_set_ip_config (self, AF_INET, NULL, FALSE, NULL);
|
||||
nm_device_set_ip_config (self, AF_INET6, NULL, FALSE, NULL);
|
||||
if (unconfigure_ip_config) {
|
||||
nm_device_set_ip_config (self, AF_INET, NULL, FALSE, NULL);
|
||||
nm_device_set_ip_config (self, AF_INET6, NULL, FALSE, NULL);
|
||||
} else {
|
||||
if (priv->dhcp4.client)
|
||||
nm_dhcp_client_stop (priv->dhcp4.client, FALSE);
|
||||
if (priv->dhcp6.client)
|
||||
nm_dhcp_client_stop (priv->dhcp6.client, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue