Bug 12646 - dhcpc.c not using discover_retries in REQUESTING state
Summary: dhcpc.c not using discover_retries in REQUESTING state
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.31.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-16 11:54 UTC by john.lange2
Modified: 2020-03-16 11:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description john.lange2 2020-03-16 11:54:09 UTC
dhcpc.c is not using discover_retries while in REQUESTING state. The code assumes a value of 3. Instead, it should use the -t parameter provided on command line. The following diff could address this issue:
1505c1505
<                               if (packet_num < 3) {
---
>                               if (!discover_retries || packet_num <= discover_retries) {

Note "<=" is used so that discover_retries value of 1 will work, since packet_num is also incremented within state INIT_SELECTING.