mirror of https://github.com/OISF/suricata
pcap: set snaplen to MTU if available.
Main objective of this patch is to use a dynamic snaplen to avoid to truncate packet at the currently fixed snaplen. It set snaplen to MTU length if the MTU can be retrieved. If not, it does not set the snaplen which results in using a 65535 snaplen. libpcap is trying to use mmaped capture and setup the ring by using buffer_size as the total memory. It also use "rounded" snaplen as frame size. So if we set snaplen to MTU when available we are optimal regarding the building of the ring.pull/287/merge
parent
cc51eec59d
commit
1aaa828b63
Loading…
Reference in New Issue