google / google/gopacket

Write Output Pcap, followed by Read with BPF filter, snaplen=0 error

Open
#786 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Capture from Interface && Creating a PCAP file with *pcapgo.NgWriter
Writes successfully to disk

Read from PCAP File (previously written), Apply BPF
"snaplen of 0 rejects all packets" crash @ err = handle.SetBPFFilter(bpf);

If you use an outside pcap from internet, apply bpf the code works fine.. so far only crashes on pcap's created by *pcapgo.NgWriter

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.