mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-10 14:58:30 +02:00
dhcp/nettools: don't clear effective client-id on restart
When ip4_start() is called after a restart (priv->client already exists),
nettools_create() is skipped so effective_client_id stays NULL. The
unconditional nm_dhcp_client_set_effective_client_id() call then clears
the client-id that was properly set during the initial start.
Only update the effective client-id when it was actually obtained from
nettools_create().
Fixes: 1db882ca63 ('dhcp: allow the plugin to be restarted')
This commit is contained in:
parent
b0bdaa29c9
commit
348af3aa30
1 changed files with 2 additions and 1 deletions
|
|
@ -1525,7 +1525,8 @@ ip4_start(NMDhcpClient *client, GError **error)
|
|||
|
||||
_LOGT("dhcp-client4: start " NM_HASH_OBFUSCATE_PTR_FMT, NM_HASH_OBFUSCATE_PTR(priv->client));
|
||||
|
||||
nm_dhcp_client_set_effective_client_id(client, effective_client_id);
|
||||
if (effective_client_id)
|
||||
nm_dhcp_client_set_effective_client_id(client, effective_client_id);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue