]> The Tcpdump Group git mirrors - libpcap/commit
If we're reading from a savefile, don't try to install a kernel packet
authorguy <guy>
Wed, 25 Oct 2000 05:59:04 +0000 (05:59 +0000)
committerguy <guy>
Wed, 25 Oct 2000 05:59:04 +0000 (05:59 +0000)
commitfd8a7488b13e646c1ee8f1420db1746117ac8f70
treeab019ae35dffdb854db2abf85e9881e27327f339
parent72f94b64592036d32df36465f07445653d46448a
If we're reading from a savefile, don't try to install a kernel packet
filter.

It appears that "recvfrom()", in 2.2 and later kernels, doesn't check
whether the starting buffer address plus the byte count goes into an
unmapped region of the address space - it (or code it calls) presumably
only checks the locations into which it's actually copying data - so
there doesn't appear to be, on systems with 2.2 and later kernels, any
need to ensure that the buffer size is at least large as the snapshot
length.  We therefore only do so if we're using the old
PF_INET/SOCK_PACKET mechanism; if we're using PF_PACKET, we're on a
2.2 or later kernel, so we don't do it there.
pcap-linux.c