mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
tcpip/sniffer: Allow writing pcap to both writer and logger
This commit is contained in:
@@ -140,7 +140,7 @@ func (e *endpoint) DeliverNetworkPacket(protocol tcpip.NetworkProtocolNumber, pk
|
||||
|
||||
func (e *endpoint) dumpPacket(dir Direction, protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) {
|
||||
writer := e.writer
|
||||
if writer == nil && LogPackets.Load() == 1 {
|
||||
if LogPackets.Load() == 1 {
|
||||
LogPacket(e.logPrefix, dir, protocol, pkt)
|
||||
}
|
||||
if writer != nil && LogPacketsToPCAP.Load() == 1 {
|
||||
|
||||
Reference in New Issue
Block a user