aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-dlpi.c
diff options
context:
space:
mode:
authorguy <guy>2002-03-05 04:05:56 +0000
committerguy <guy>2002-03-05 04:05:56 +0000
commit0c86142e9972c35958f847dff0f0e43c68a01d61 (patch)
tree0b99d4d1c48b9e1c9f4aeb355612874aaa34c979 /pcap-dlpi.c
parentc9f3b70d22a4ae301f8f5c86f87c9f5f5a9229de (diff)
From John Bankier <jbankier@rainfinity.com>: the buffer into which we
read packets is "p->bufsize" bytes long, not MAXDLBUF bytes long ("p->bufsize" is set to (MAXDLBUF * sizeof sizeof(bpf_u_int32))), so supply that as the "maxlen" value in the "data" argument to "getmsg()".
Diffstat (limited to 'pcap-dlpi.c')
-rw-r--r--pcap-dlpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap-dlpi.c b/pcap-dlpi.c
index fd31af6..29ae62f 100644
--- a/pcap-dlpi.c
+++ b/pcap-dlpi.c
@@ -38,7 +38,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.75 2002-02-22 11:49:13 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.76 2002-03-05 04:05:56 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -177,7 +177,7 @@ pcap_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
cc = p->cc;
if (cc == 0) {
data.buf = (char *)p->buffer + p->offset;
- data.maxlen = MAXDLBUF;
+ data.maxlen = p->bufsize;
data.len = 0;
do {
if (getmsg(p->fd, &ctl, &data, &flags) < 0) {