Files
firezone/rust/socket-factory
Thomas Eizinger b7bef6d062 chore(rust): use new try_send APIs in quinn-udp (#7185)
With the recent lobbying effort in `quinn-udp`, we were able to get
`try_send` APIs for the UDP socket that doesn't silence any errors while
sending datagrams. Originally, the reasoning in `quinn-udp` was that
because UDP is an unreliable protocol anyway, errors don't need to be
surfaced because there must be upper-level mechanisms for retrying
messages. Whilst that is true, getting immediate feedback that something
isn't working can also be very beneficial. For example, if you don't
have proper IPv6 connectivity on a socket, the syscall will immediately
fail with `DestinationUnreachable`.

Within Firezone, we use these UDP sockets to send all kinds of messages,
including DNS queries to upstream servers. In case that doesn't work,
failing instantly allows us to send a SERVFAIL error back to the OS
right away instead of having to wait for a timeout.

Additionally, `quinn-udp` logs these send errors on WARN which cause
unnecessary noise in Sentry.

Resolves: #6353.
2024-10-30 16:17:52 +00:00
..