MSRP: Support TCP defragmentation in MSRP

Add support to the MSRP dissector to reassemble messages from multiple
packets.

Bug: 8270
Change-Id: I464c91b2e6e3c4edc242b3e2f52a8febc455e5ae
Reviewed-on: https://code.wireshark.org/review/36894
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Kevin Hausman 2020-04-20 08:32:40 -05:00 committed by Anders Broman
parent 17298cc0fb
commit a1266a6363
1 changed files with 14 additions and 11 deletions

View File

@ -508,6 +508,20 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
}
/* Find the end line to be able to process the headers
* Note that in case of [content-stuff] headers and [content-stuff] is separated by CRLF
*/
offset = next_offset;
end_line_offset = find_end_line(tvb,offset);
if (end_line_offset < 0) {
pinfo->desegment_offset = 0;
pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
return tvb_reported_length_remaining(tvb, offset);
}
end_line_len = tvb_find_line_end(tvb, end_line_offset, -1, &next_offset, FALSE);
message_end_offset = end_line_offset + end_line_len + 2;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MSRP");
if (is_msrp_response){
@ -528,17 +542,6 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
tvb_format_text(tvb, token_2_start, token_2_len));
}
/* Find the end line to be able to process the headers
* Note that in case of [content-stuff] headers and [content-stuff] is separated by CRLF
*/
offset = next_offset;
end_line_offset = find_end_line(tvb,offset);
/* TODO if -1 (No end line found, is returned do something) */
end_line_len = tvb_find_line_end(tvb, end_line_offset, -1, &next_offset, FALSE);
message_end_offset = end_line_offset + end_line_len + 2;
if (tree) {
ti = proto_tree_add_item(tree, proto_msrp, tvb, 0, message_end_offset, ENC_NA);
msrp_tree = proto_item_add_subtree(ti, ett_msrp);