Dhclient dumps core on suspend/resume cycles. If the client isn't active
then we need to go to the reboot state or in state_bound it will core on the de-reference of client -> active -> options since client -> active = NULL. While we are here, fix the indentation. Submitted by: Doug Ambrisko <ambrisko@ambrisko.com>
This commit is contained in:
parent
87b4a80d97
commit
a74e1146f3
@ -3442,11 +3442,16 @@ void state_polling (cpp)
|
||||
*/
|
||||
for (client = ip -> client;
|
||||
client; client = client -> next) {
|
||||
cancel_timeout (state_init, client);
|
||||
cancel_timeout (state_reboot, client);
|
||||
cancel_timeout (state_selecting, client);
|
||||
cancel_timeout (state_init, client);
|
||||
cancel_timeout (state_reboot, client);
|
||||
cancel_timeout (state_selecting, client);
|
||||
if (client -> active) {
|
||||
add_timeout (cur_time + random () % 5,
|
||||
state_bound, client, 0, 0);
|
||||
state_bound, client, 0, 0);
|
||||
} else {
|
||||
add_timeout (cur_time + random () % 5,
|
||||
state_reboot, client, 0, 0);
|
||||
}
|
||||
}
|
||||
ip -> linkstate = HAVELINK;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user