tcpip/sniffer: Allow writing pcap to both writer and logger

This commit is contained in:
ignoramous
2024-03-29 19:45:35 +05:30
committed by GitHub
parent 88ee65f3a8
commit 75dccf3366
+1 -1
View File
@@ -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 {