]> The Tcpdump Group git mirrors - libpcap/commitdiff
From John Bankier <[email protected]>: the buffer into which we
authorguy <guy>
Tue, 5 Mar 2002 04:05:56 +0000 (04:05 +0000)
committerguy <guy>
Tue, 5 Mar 2002 04:05:56 +0000 (04:05 +0000)
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()".

CREDITS
pcap-dlpi.c

diff --git a/CREDITS b/CREDITS
index 60dfc579735f62011bee356ce28160eaa019bc13..34e88d2d7c696aae6dc443cbea47bc3c5ad18947 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -28,6 +28,7 @@ Additional people who have contributed patches:
        Jason R. Thorpe                 <[email protected]>
        Javier Achirica                 <[email protected]>
        Jefferson Ogata                 <[email protected]>
+       John Bankier                    <[email protected]>
        Juergen Schoenwaelder           <[email protected]>
        Klaus Klein                     <[email protected]>
        Lorenzo Cavallaro               <[email protected]>
index fd31af61e07b1fa675b3215d7cab78a5a1fc764e..29ae62fe7ff39ed5989c10bebc4146e51bd7f3b6 100644 (file)
@@ -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) {