cloudflare / boringtun

Userspace WireGuard® Implementation in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keeping timers relative to start of tunnel initiation is confusing

agrover opened this issue · comments

Keeping timers this way means that for example update_session_timers takes a time_now param that's a Duration instead of an Instant. All entries in Tunn::timers are Durations when many of them are "the time that something happened" and idiomatically I think these would be better expressed as Instants.

Agreed.

@agrover @Noah-Kennedy Anyone available to review? 😁

Friendly ping! This would be a nice addition :)

Friendly ping! This would be a nice addition :)

@thomaseizinger does my PR accomplish what you're looking for? If so I'll rebase it.

Friendly ping! This would be a nice addition :)

@thomaseizinger does my PR accomplish what you're looking for? If so I'll rebase it.

Yes! I am hoping that we can also move this to be entirely SANS-IO so we have control over the what "now" is :)

See #391.