Ethereal-dev: [Ethereal-dev] [PATCH] WTP reassembly fails on empty trailing packets
Good morning list,
WTP reassembly occurs until a flag is set in the last packet. However,
the WTP dissector only considers reassembly if the payload length isn't
zero.
While it is stupid to set the "last packet" flag in a separate
packet, it is permitted by the norm (ie. not forbidden).
Attached (trivial) patch fix the issue and attached capture exposes the
problem (20K).
[ I am sorry for the size of the attachments, I have nowhere to host them
right now. ]
Best regards,
--
Loïc Minier <lool@xxxxxxxx>
[ sorry for switching mail addresses, mail servers currently down ]
Index: packet-wtp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-wtp.c,v
retrieving revision 1.51
diff -u -b -r1.51 packet-wtp.c
--- packet-wtp.c 29 Jul 2003 22:10:18 -0000 1.51
+++ packet-wtp.c 7 Aug 2003 09:39:39 -0000
@@ -597,7 +597,7 @@
* Any remaining data ought to be WSP data (if not WTP ACK, NACK
* or ABORT pdu), so hand off (defragmented) to the WSP dissector
*/
- if ((tvb_reported_length_remaining(tvb, offCur + cbHeader + vHeader) > 0) &&
+ if ((tvb_reported_length_remaining(tvb, offCur + cbHeader + vHeader) >= 0) &&
! ((pdut==ACK) || (pdut==NEGATIVE_ACK) || (pdut==ABORT)))
{
int dataOffset = offCur + cbHeader + vHeader;
Attachment:
wtp.o
Description: application/object