mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(connlib): improve wire::dev logging (#8272)
This will log more details about the packet, such as SYN, RST and FIN flags for TCP.
This commit is contained in:
@@ -55,7 +55,7 @@ impl Device {
|
||||
tracing::warn!("Packet matches heuristics of FZ-internal p2p control protocol");
|
||||
}
|
||||
|
||||
tracing::trace!(target: "wire::dev::recv", dst = %packet.destination(), src = %packet.source(), bytes = %packet.packet().len());
|
||||
tracing::trace!(target: "wire::dev::recv", ?packet);
|
||||
}
|
||||
|
||||
Poll::Ready(n)
|
||||
@@ -77,7 +77,7 @@ impl Device {
|
||||
}
|
||||
}
|
||||
|
||||
tracing::trace!(target: "wire::dev::send", dst = %packet.destination(), src = %packet.source(), bytes = %packet.packet().len());
|
||||
tracing::trace!(target: "wire::dev::send", ?packet);
|
||||
|
||||
debug_assert!(
|
||||
!packet.is_fz_p2p_control(),
|
||||
|
||||
@@ -168,6 +168,14 @@ impl std::fmt::Debug for IpPacket {
|
||||
if tcp.syn() {
|
||||
dbg.field("syn", &true);
|
||||
}
|
||||
|
||||
if tcp.rst() {
|
||||
dbg.field("rst", &true);
|
||||
}
|
||||
|
||||
if tcp.fin() {
|
||||
dbg.field("fin", &true);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(udp) = self.as_udp() {
|
||||
|
||||
Reference in New Issue
Block a user