Files
firezone/rust/logging
Thomas Eizinger 3d6ed6dde7 refactor(connlib): respond with SERVFAIL on resolver error (#7067)
Currently, any failure in the `StubResolver` while processing a query
results only in a log but no response. For UDP DNS queries, that isn't
too bad because the client will simply retry. With the upcoming support
for TCP DNS queries in #6944, we should really always reply with a
message.

This PR refactors the handling of DNS messages to always generate a
reply. In the case of an error, we reply with SERVFAIL.

This opens up a few more refactorings where we can now collapse the
handling of some branches into the same. As part of that, I noticed the
recurring need for "unwrapping" a `Result<(), E>` and logging the error.
To make that easier, I introduced an extension trait that does exactly
that.
2024-10-17 03:01:59 +00:00
..