mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
sd-dhcp6-client: max_retransmit_time must be positive
Found by LGTM.com analysis.
This commit is contained in:
parent
fea8c18085
commit
7502812c92
@ -1067,8 +1067,8 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userda
|
||||
client->retransmit_time += init_retransmit_time / 10;
|
||||
|
||||
} else {
|
||||
if (max_retransmit_time > 0 &&
|
||||
client->retransmit_time > max_retransmit_time / 2)
|
||||
assert(max_retransmit_time > 0);
|
||||
if (client->retransmit_time > max_retransmit_time / 2)
|
||||
client->retransmit_time = client_timeout_compute_random(max_retransmit_time);
|
||||
else
|
||||
client->retransmit_time += client_timeout_compute_random(client->retransmit_time);
|
||||
|
Loading…
Reference in New Issue
Block a user