mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-08-26 08:00:27 +00:00
7f21784537
A message received via inter-node transfer, on systems hosted on AWS, could end up with a wildly incorrect far-future timestamp. The underlying mac_address crate would pick a NIC with the same MAC address as other AWS instances in the cluster, and that triggered a code path where the collision resolving logic misinterpreted the timestamp portion of the incoming spool id. The thing that made this painful was the logic in spool_id.rs: it misinterpreted the subsecond portion of the timestamp extracted from the uuid, and due to the way that that field wraps, could produce wildly inaccurate deltas with a huge multiplier. As a belt and suspenders treatment, allow the user to influence which MAC address is selected via the new KUMO_MAC_INTERFACE and KUMO_MAC_ADDRESS environment variables.