Closed stapelberg closed 5 years ago
Suspicion: when another MAC address new
obtains an expired lease, h.leasesHW[old]
is not updated, hence https://github.com/rtr7/router7/blob/badee1eef80baafefc353a463bae29bbbae4af15/internal/dhcp4d/dhcp4d.go#L220-L223 returns true and the lease is handed out again.
I’ll write a test to verify this tomorrow. A good fix would probably be to make leasesHW a map from hwaddr to leaseNum, so that there is precisely one data structure which needs to be updated, not two.
Unfortunately I don’t have a full capture because of issue #17