mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-19 19:00:38 +01:00
n-dhcp4: send request directly to avoid unnecessary retransmission timeout
Using `n_dhcp4_c_connection_start_request()` will cause staying in `connection->request`, as a result, it will cause the resending of DHCPRELEASE and DHCPDECLINE message, thus, use `n_dhcp4_c_connection_send_request()` directly instead to avoid unnecessary retransmission timeout, as suggested byf030927a54 (r1531834009). (cherry picked from commit55710d3d7c)
This commit is contained in:
parent
fc58c3295d
commit
4a077a8fcc
3 changed files with 8 additions and 5 deletions
|
|
@ -1010,9 +1010,9 @@ static const char *message_type_to_str(uint8_t type) {
|
|||
}
|
||||
}
|
||||
|
||||
static int n_dhcp4_c_connection_send_request(NDhcp4CConnection *connection,
|
||||
NDhcp4Outgoing *request,
|
||||
uint64_t timestamp) {
|
||||
int n_dhcp4_c_connection_send_request(NDhcp4CConnection *connection,
|
||||
NDhcp4Outgoing *request,
|
||||
uint64_t timestamp) {
|
||||
char server_addr[INET_ADDRSTRLEN];
|
||||
char client_addr[INET_ADDRSTRLEN];
|
||||
char error_msg[128];
|
||||
|
|
|
|||
|
|
@ -1137,7 +1137,7 @@ int n_dhcp4_client_probe_transition_decline(NDhcp4ClientProbe *probe, NDhcp4Inco
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
r = n_dhcp4_c_connection_start_request(&probe->connection, request, ns_now);
|
||||
r = n_dhcp4_c_connection_send_request(&probe->connection, request, ns_now);
|
||||
if (r)
|
||||
return r;
|
||||
else
|
||||
|
|
@ -1340,7 +1340,7 @@ int n_dhcp4_client_probe_release(NDhcp4ClientProbe *probe) {
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
r = n_dhcp4_c_connection_start_request(&probe->connection, request_out, 0);
|
||||
r = n_dhcp4_c_connection_send_request(&probe->connection, request_out, 0);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
|
|
|
|||
|
|
@ -642,6 +642,9 @@ int n_dhcp4_c_connection_release_new(NDhcp4CConnection *connection,
|
|||
int n_dhcp4_c_connection_start_request(NDhcp4CConnection *connection,
|
||||
NDhcp4Outgoing *request,
|
||||
uint64_t timestamp);
|
||||
int n_dhcp4_c_connection_send_request(NDhcp4CConnection *connection,
|
||||
NDhcp4Outgoing *request,
|
||||
uint64_t timestamp);
|
||||
int n_dhcp4_c_connection_dispatch_timer(NDhcp4CConnection *connection,
|
||||
uint64_t timestamp);
|
||||
int n_dhcp4_c_connection_dispatch_io(NDhcp4CConnection *connection,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue