Files
firezone/rust
Thomas Eizinger 370a0e4b4e fix(snownet): invalidate allocation on invalid credentials (#4537)
When a relay restarts, our local credentials will be invalid and no
amount of retrying can fix this.

Currently, the `Allocation` can end up in busy-looping state if:

1. The allocation would be due for a refresh
2. The relay was restarted
3. We haven't received new credentials yet because we haven't made a new
connection attempt that uses the same relay

The above was observed in #4521 and results in log-spam of:

> Invalid credentials, refusing to re-authenticate refresh

One part of the state machine correctly discards the message instead of
re-sending it. Unfortunately, the result of (1) means there is still a
timer that fires and attempts to refresh the allocation.

To stop this busy-looping behaviour, we need to invalidate the
allocation if we detect that our credentials are wrong. This will also
invalidate the candidates which will fail any connection that is
currently using this relay. This would have likely already happened
before because a relay that is restarted would have lost all channel
bindings and thus, the ICE timeout will kick-in.
2024-04-08 22:55:00 +00:00
..
2023-05-10 07:58:32 -07:00

Rust development guide

Firezone uses Rust for all data plane components. This directory contains the Linux and Windows clients, and low-level networking implementations related to STUN/TURN.

We target the last stable release of Rust using rust-toolchain.toml. If you are using rustup, that is automatically handled for you. Otherwise, ensure you have the latest stable version of Rust installed.