summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/sniffer/sniffer.go
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-07-07 13:27:38 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-07 13:30:31 -0700
commit02fec8dba5a6148e44da2715e26246a5d91e64fa (patch)
tree90aca36de68fc8414e865b3aea2355effb8c7e60 /pkg/tcpip/link/sniffer/sniffer.go
parentcd558fcb05c30bc08bbb9ba47755c2768fa33316 (diff)
Move time.Now() call to sniffer
PiperOrigin-RevId: 383481745
Diffstat (limited to 'pkg/tcpip/link/sniffer/sniffer.go')
-rw-r--r--pkg/tcpip/link/sniffer/sniffer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/link/sniffer/sniffer.go b/pkg/tcpip/link/sniffer/sniffer.go
index 530d737ba..232a26a18 100644
--- a/pkg/tcpip/link/sniffer/sniffer.go
+++ b/pkg/tcpip/link/sniffer/sniffer.go
@@ -155,7 +155,7 @@ func (e *endpoint) dumpPacket(dir direction, protocol tcpip.NetworkProtocolNumbe
if max := int(e.maxPCAPLen); length > max {
length = max
}
- if err := binary.Write(writer, binary.BigEndian, newPCAPPacketHeader(uint32(length), uint32(totalLength))); err != nil {
+ if err := binary.Write(writer, binary.BigEndian, newPCAPPacketHeader(time.Now(), uint32(length), uint32(totalLength))); err != nil {
panic(err)
}
write := func(b []byte) {