NLnetLabs / routinator

An RPKI Validator and RTR server written in Rust
https://nlnetlabs.nl/projects/routing/routinator/
BSD 3-Clause "New" or "Revised" License
470 stars 71 forks source link

Update the current snapshot even if there is no delta. #940

Closed partim closed 8 months ago

partim commented 8 months ago

This PR fixes an issue with calculating the refresh time under certain conditions by updating the current internal payload snapshot even if the delta to the previous snapshot is empty.

Because this snapshot also contains the expiry time of certificate first to expire and this time is used as the refresh time if it is closer than the configure refresh time (so the date derived from the expired certificate is removed as soon as possible), not updating the snapshot can lead to a refresh time in the past (effectively: an immediate refresh) if there is a second, longer living object for an expiring object.