aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-08-20 05:18:10 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-08-20 05:18:10 +0000
commit0adb40dbc07203c2eb673f9e9e2adc2cf20f319b (patch)
tree184f126c95058dedc3f9fe30dfbd19149f450ef5 /epan
parenta238f1f7acf4e8afcd70ae3670f0ca1f8a0c3f34 (diff)
we have to search for multisegments starting PRIOR to the start of the current semgent or elsae it will break for the case when one multisegment ends in this segment there are a few smaller ones completely within this segment and then another segment starts that spans across future segments.
svn path=/trunk/; revision=18964
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-tcp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index af9b085f2f..ef54335398 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -308,7 +308,7 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
struct tcp_multisegment_pdu *msp=NULL;
if(!pinfo->fd->flags.visited){
- msp=se_tree_lookup32_le(tcpd->fwd->multisegment_pdus, seq);
+ msp=se_tree_lookup32_le(tcpd->fwd->multisegment_pdus, seq-1);
if(msp){
/* If this segment is completely within a previous PDU
* then we just skip this packet
@@ -326,7 +326,7 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
}
} else {
- msp=se_tree_lookup32_le(tcpd->fwd->multisegment_pdus, seq);
+ msp=se_tree_lookup32_le(tcpd->fwd->multisegment_pdus, seq-1);
if(msp){
if(pinfo->fd->num==msp->first_frame){
proto_item *item;
@@ -355,7 +355,6 @@ scan_for_next_pdu(tvbuff_t *tvb, proto_tree *tcp_tree, packet_info *pinfo, int o
}
}
}
-
return offset;
}
@@ -1083,7 +1082,7 @@ again:
deseg_offset = offset;
/* find the most previous PDU starting before this sequence number */
- msp=se_tree_lookup32_le(tcpd->fwd->multisegment_pdus, seq);
+ msp=se_tree_lookup32_le(tcpd->fwd->multisegment_pdus, seq-1);
if(msp && msp->seq<=seq && msp->nxtpdu>seq){
int len;
@@ -1537,7 +1536,7 @@ tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
RETHROW;
}
CATCH(ReportedBoundsError) {
- show_reported_bounds_error(tvb, pinfo, tree);
+ show_reported_bounds_error(tvb, pinfo, tree);
}
ENDTRY;