From 0c86142e9972c35958f847dff0f0e43c68a01d61 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 5 Mar 2002 04:05:56 +0000 Subject: From John Bankier : 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()". --- pcap-dlpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pcap-dlpi.c') 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) { -- cgit v1.2.3