implement DHCPDECLINE by ensuring the device gets a different IP
Closed this issue · 1 comments
stapelberg commented
Turns out that Apple’s DHCP client sends DHCPDECLINE requests when it’s unhappy about a lease (e.g. because it thinks the IP address is still in use by some other device).
We should implement that and ensure giving out a different address for subsequent requests. This will result in a better failure mode.
stapelberg commented
We’re already using rand.Intn
to avoid handing out the same IP address:
router7/internal/dhcp4d/dhcp4d.go
Line 152 in 53c4950
…so I’m thinking that we would also need to delete all previous leases for this MAC address from the database to avoid hitting this code path:
router7/internal/dhcp4d/dhcp4d.go
Line 286 in 53c4950