mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 01:55:22 +03:00
sd-dhcp-client: rebind raw socket when resetting transaction id
As we are now filtering the raw socket based on the transaction id, we must reset the BPF when we reset the transaction id.
This commit is contained in:
parent
4d978a4669
commit
eb105b96d5
@ -473,7 +473,13 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
|
||||
/* start over as we did not receive a timely ack or nak */
|
||||
client->state = DHCP_STATE_INIT;
|
||||
client->attempt = 1;
|
||||
|
||||
client->fd = safe_close(client->fd);
|
||||
client->xid = random_u32();
|
||||
r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid);
|
||||
if (r < 0)
|
||||
goto error;
|
||||
client->fd = r;
|
||||
|
||||
/* fall through */
|
||||
case DHCP_STATE_INIT:
|
||||
|
Loading…
Reference in New Issue
Block a user