-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ken,
thanks for the patch. It's on CVS now.

Cheers, Luca

On 28 gen 2004, at 19:25, Ken Beaty wrote:

Luca et al:

        I noticed a problem (for me, anyway) between 2.2.98 and 2.2.99
in pbuf.c.  I typically run with decoders disabled without problems.
However, after to cvs update, I began getting a syslog full of:

Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 90
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 590
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 1494
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 87
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 1514
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 78
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 74
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 740
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 1514
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 830
Jan 27 17:45:01 host ntop[25558]: **WARNING** dequeuePacket: caplen 68
!= len 1434


        I thought it was related to stuff I'm playing with, so I did a
completely fresh checkout;  however, the voluminous errors persisted.
So, I followed the logic as I understood it and I offer the following
patch:


--- ntop/pbuf.c.orig 2004-01-26 14:12:01.000000000 -0500 +++ ntop/pbuf.c 2004-01-27 18:13:49.000000000 -0500 @@ -2248,7 +2248,7 @@ 2. MAX_PACKET_LEN should probably be removed 3. all the functions must check that they are not going beyond packet boundaries */ - if (h.caplen != h.len) { + if ((h.caplen != h.len) && (myGlobals.enablePacketDecoding)) { traceEvent (CONST_TRACE_WARNING, "dequeuePacket: caplen %d != len %d\n", h.caplen, h.len); }

        It fixes the problem on my system and should be correct, if I
understand the logic correctly.

ken
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev


- ------- Luca Deri <[EMAIL PROTECTED]> http://luca.ntop.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin)

iD8DBQFAG+IumMhDxnkh3zQRAkutAJ9ljHytbEL8NW1+s/3JzPbUjRN6FACeKvRq
6X4qF7l3vlZoZtqgIYupPYw=
=PdNm
-----END PGP SIGNATURE-----

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to