diff options
author | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2024-03-05 11:54:50 +0100 |
---|---|---|
committer | Fernando Fernandez Mancera <ffmancera@riseup.net> | 2024-03-06 11:14:16 +0100 |
commit | 0f0f1bbf8aa5c8d47252e6b8349186948f7529f5 (patch) | |
tree | 22df60daac86a219987fd1fd102fe527545b21b4 | |
parent | 3be44c0aa8e52c7df0d3c1ffef0b6855856c950d (diff) |
n-dhcp4: set xid value of the DHCP header for RELEASE and DECLINE message
The `xid` of the DHCP header must be initialized for RELEASE and DECLINE
messages [1].
[1] https://datatracker.ietf.org/doc/html/rfc2131#section-4.4.1
-rw-r--r-- | src/n-dhcp4/src/n-dhcp4-c-connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/n-dhcp4/src/n-dhcp4-c-connection.c b/src/n-dhcp4/src/n-dhcp4-c-connection.c index 7cb4f23fe0..7024b71ac9 100644 --- a/src/n-dhcp4/src/n-dhcp4-c-connection.c +++ b/src/n-dhcp4/src/n-dhcp4-c-connection.c @@ -1031,13 +1031,13 @@ static int n_dhcp4_c_connection_send_request(NDhcp4CConnection *connection, case N_DHCP4_C_MESSAGE_REBOOT: case N_DHCP4_C_MESSAGE_REBIND: case N_DHCP4_C_MESSAGE_RENEW: + case N_DHCP4_C_MESSAGE_DECLINE: + case N_DHCP4_C_MESSAGE_RELEASE: request->userdata.base_time = timestamp; n_dhcp4_outgoing_set_xid(request, n_dhcp4_client_probe_config_get_random(connection->probe_config)); break; case N_DHCP4_C_MESSAGE_SELECT: - case N_DHCP4_C_MESSAGE_DECLINE: - case N_DHCP4_C_MESSAGE_RELEASE: break; default: c_assert(0); |