diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-08-19 12:41:48 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-19 12:43:22 -0700 |
commit | 3ffbdffd7e96e406fd3136818e0402cf0c2f0d4d (patch) | |
tree | f52c283ba1c64fc9e19d65b5c540177cb9b4eacc /pkg | |
parent | a63f88855f9c5d9340028e5828617a263dbf3023 (diff) |
Internal change.
PiperOrigin-RevId: 264218306
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/tcpip/link/sniffer/sniffer.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/tcpip/link/sniffer/sniffer.go b/pkg/tcpip/link/sniffer/sniffer.go index fc584c6a4..36c8c46fc 100644 --- a/pkg/tcpip/link/sniffer/sniffer.go +++ b/pkg/tcpip/link/sniffer/sniffer.go @@ -360,10 +360,9 @@ func logPacket(prefix string, protocol tcpip.NetworkProtocolNumber, b buffer.Vie if fragmentOffset == 0 && len(udp) >= header.UDPMinimumSize { srcPort = udp.SourcePort() dstPort = udp.DestinationPort() + details = fmt.Sprintf("xsum: 0x%x", udp.Checksum()) + size -= header.UDPMinimumSize } - size -= header.UDPMinimumSize - - details = fmt.Sprintf("xsum: 0x%x", udp.Checksum()) case header.TCPProtocolNumber: transName = "tcp" |