mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 11:40:08 +01:00
sd-dhcp-client: clean up raw socket sd_event_source when creating UDP source
The raw socket sd_event_source used for DHCP server solicitations was simply dropped on the floor when creating the new UDP socket after a lease has been acquired. Clean it up properly so we're not still listening and responding to events on it.
This commit is contained in:
parent
d0bb1592f6
commit
389daa38f7
1 changed files with 3 additions and 0 deletions
|
|
@ -1373,6 +1373,9 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
|
|||
if (r >= 0) {
|
||||
client->timeout_resend =
|
||||
sd_event_source_unref(client->timeout_resend);
|
||||
client->receive_message =
|
||||
sd_event_source_unref(client->receive_message);
|
||||
client->fd = asynchronous_close(client->fd);
|
||||
|
||||
if (IN_SET(client->state, DHCP_STATE_REQUESTING,
|
||||
DHCP_STATE_REBOOTING))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue