mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 20:10:17 +01:00
dhcp: ensure DHCP client is stopped on timeout
This commit is contained in:
parent
4f537c195c
commit
fbe413cbcd
2 changed files with 4 additions and 1 deletions
|
|
@ -193,7 +193,8 @@ daemon_timeout (gpointer user_data)
|
|||
NMDHCPClient *self = NM_DHCP_CLIENT (user_data);
|
||||
NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self);
|
||||
|
||||
g_message ("(%s): DHCP transaction took too long, stopping it.", priv->iface);
|
||||
g_message ("(%s): DHCPv%c request timed out.",
|
||||
priv->iface, priv->ipv6 ? '6' : '4');
|
||||
g_signal_emit (G_OBJECT (self), signals[TIMEOUT], 0);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1224,6 +1224,8 @@ dhcp_timeout (NMDHCPClient *client, gpointer user_data)
|
|||
if (!nm_device_get_act_request (device))
|
||||
return;
|
||||
|
||||
nm_dhcp_client_stop (client);
|
||||
|
||||
if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) {
|
||||
if (nm_dhcp_client_get_ipv6 (client))
|
||||
nm_device_activate_schedule_stage4_ip6_config_timeout (device);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue