mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(connlib): improve error messages for failed translations (#7540)
This commit is contained in:
@@ -98,7 +98,7 @@ impl GatewayState {
|
||||
|
||||
let packet = peer
|
||||
.translate_inbound(packet, now)
|
||||
.context("Failed to translate packet")?;
|
||||
.context("Failed to translate inbound packet")?;
|
||||
|
||||
let Some(encrypted_packet) = self
|
||||
.node
|
||||
@@ -156,7 +156,7 @@ impl GatewayState {
|
||||
|
||||
let packet = peer
|
||||
.translate_outbound(packet, now)
|
||||
.context("Failed to translate packet")?;
|
||||
.context("Failed to translate outbound packet")?;
|
||||
|
||||
Ok(Some(packet))
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ impl ClientOnGateway {
|
||||
|
||||
let mut packet = packet
|
||||
.translate_destination(self.ipv4, self.ipv6, source_protocol, real_ip)
|
||||
.context("Failed to translate packet")?;
|
||||
.context("Failed to translate packet to new destination")?;
|
||||
packet.update_checksum();
|
||||
|
||||
Ok(packet)
|
||||
@@ -375,7 +375,9 @@ impl ClientOnGateway {
|
||||
TranslateIncomingResult::NoNatSession => return Ok(packet),
|
||||
};
|
||||
|
||||
let mut packet = packet.translate_source(self.ipv4, self.ipv6, proto, ip)?;
|
||||
let mut packet = packet
|
||||
.translate_source(self.ipv4, self.ipv6, proto, ip)
|
||||
.context("Failed to translate packet to new source")?;
|
||||
packet.update_checksum();
|
||||
|
||||
Ok(packet)
|
||||
|
||||
Reference in New Issue
Block a user