Closed edigaryev closed 7 months ago
Before we were trying to handle condition this by filtering out expired leases: https://github.com/cirruslabs/tart/blob/3f17884ac2bdba56f5688537aa6da4d14533e3f4/Sources/tart/MACAddressResolver/Leases.swift#L42-L44
However, it seems that it's possible to have two un-expired leases for the same MAC-address at the same time.
So let's prefer a newer lease over the older one when a duplicate is found.
See https://github.com/cirruslabs/tart/issues/739 for more details.
Before we were trying to handle condition this by filtering out expired leases: https://github.com/cirruslabs/tart/blob/3f17884ac2bdba56f5688537aa6da4d14533e3f4/Sources/tart/MACAddressResolver/Leases.swift#L42-L44
However, it seems that it's possible to have two un-expired leases for the same MAC-address at the same time.
So let's prefer a newer lease over the older one when a duplicate is found.
See https://github.com/cirruslabs/tart/issues/739 for more details.