Commit 2450603
committed
Fix flaky DHCP in non-Thunder builds in rpi3
If your DHCP server is dnsmasq-based, you're not building Thunder and
you're using a rpi3, there is a good chance half the time the rpi boots
without an IP address.
This is because:
* udhcp sends 3 DISCOVER, waiting 3 seconds for a response in each case.
* The NIC of the rpi3 usually takes slightly above 6 seconds from
`ifconfig eth0 up` to being functional enough to send packets, so the
first two DISCOVER packets never reach the network.
* dnsmasq will do a 3 second long ping of an IP address before assigning
it to a lease, unless its has done this recently and has it cached.
If this happens on the last DISCOVER, by the time the rpi3 gets the
OFFER packet, udhcp has already given up.
Once identified the problem, a simple fix is trivial: patch udhcp to
send more DISCOVER packets.1 parent 84742d3 commit 2450603
1 file changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments