mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-28 02:18:50 +00:00
chore(ip-packet): print length of payload (#8913)
This is useful when debugging things.
This commit is contained in:
@@ -159,7 +159,8 @@ impl std::fmt::Debug for IpPacket {
|
||||
if let Some(tcp) = self.as_tcp() {
|
||||
dbg.field("src_port", &tcp.source_port())
|
||||
.field("dst_port", &tcp.destination_port())
|
||||
.field("seq", &tcp.sequence_number());
|
||||
.field("seq", &tcp.sequence_number())
|
||||
.field("len", &tcp.payload().len());
|
||||
|
||||
if tcp.syn() {
|
||||
dbg.field("syn", &true);
|
||||
@@ -176,7 +177,8 @@ impl std::fmt::Debug for IpPacket {
|
||||
|
||||
if let Some(udp) = self.as_udp() {
|
||||
dbg.field("src_port", &udp.source_port())
|
||||
.field("dst_port", &udp.destination_port());
|
||||
.field("dst_port", &udp.destination_port())
|
||||
.field("len", &udp.payload().len());
|
||||
}
|
||||
|
||||
match self.ecn() {
|
||||
|
||||
Reference in New Issue
Block a user