forked from osmocom/wireshark
The sequence number in COTP packets is either unused (for TP0) or
relative to the beginning of the connection (for TP1-4). They are *not* relative to the first segment of a segmented TPDU, so the sequence number can't be used in calls to "fragment_add_seq_check()". For now, we assume that COTP packets are seen in order, and just use "fragment_add_seq_next()" - that's unlikely to make anything worse (the only time when "fragment_add_seq_check()" will work is when the first segment has a sequence number of 0), and definitely fixes reassembly in a number of cases. In the long term, we might want to handle out-of-order packets above the reassembly layer, so that it handles even out-of-order unsegmented packets. svn path=/trunk/; revision=11188
This commit is contained in:
parent
915f02d0f5
commit
5b96828900
|
@ -1,7 +1,7 @@
|
|||
/* packet-clnp.c
|
||||
* Routines for ISO/OSI network and transport protocol packet disassembly
|
||||
*
|
||||
* $Id: packet-clnp.c,v 1.85 2004/05/24 02:25:18 guy Exp $
|
||||
* $Id: packet-clnp.c,v 1.86 2004/06/20 01:05:07 guy Exp $
|
||||
* Laurent Deniel <laurent.deniel@free.fr>
|
||||
* Ralf Schneider <Ralf.Schneider@t-online.de>
|
||||
*
|
||||
|
@ -990,11 +990,19 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
|
|||
* segmented packet doesn't have a specific sequence number (e.g., 0
|
||||
* or 1), it has whatever the appropriate sequence number is for
|
||||
* it in the connection.
|
||||
*
|
||||
* For now, we assume segments arrive in order, and just supply
|
||||
* the negation of the EOT flag as the "more flags" argument.
|
||||
* We should probably handle out-of-order packets separately,
|
||||
* so that we can deliver them in order even when *not*
|
||||
* reassembling.
|
||||
*
|
||||
* Note also that TP0 has no sequence number, and relies on
|
||||
* the protocol atop which it runs to guarantee in-order delivery.
|
||||
*/
|
||||
fd_head = fragment_add_seq_check(next_tvb, 0, pinfo, dst_ref,
|
||||
cotp_segment_table,
|
||||
fd_head = fragment_add_seq_next(next_tvb, 0, pinfo, dst_ref,
|
||||
cotp_segment_table,
|
||||
cotp_reassembled_table,
|
||||
tpdu_nr,
|
||||
fragment_length, fragment);
|
||||
if (fd_head) {
|
||||
if (fd_head->next) {
|
||||
|
|
Loading…
Reference in New Issue