packet-iwarp-mpa.c: fix mpa_fpdu dissecting without marker pdu fragmentation

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-08-22 22:44:27 +02:00
parent 16988d2b4f
commit 92faecc3f7
1 changed files with 6 additions and 4 deletions

View File

@ -690,9 +690,11 @@ dissect_mpa_fpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* always either with a Marker or the ULPDU_LENGTH header field. * always either with a Marker or the ULPDU_LENGTH header field.
*/ */
pad_length = fpdu_pad_length(ulpdu_length); pad_length = fpdu_pad_length(ulpdu_length);
exp_ulpdu_length = expected_ulpdu_length(state, tcpinfo, endpoint); if (num_of_m > 0) {
if (!exp_ulpdu_length || exp_ulpdu_length != (ulpdu_length + pad_length)) { exp_ulpdu_length = expected_ulpdu_length(state, tcpinfo, endpoint);
return 0; if (!exp_ulpdu_length || exp_ulpdu_length != (ulpdu_length + pad_length)) {
return 0;
}
} }
mpa_packetlist(pinfo, MPA_FPDU); mpa_packetlist(pinfo, MPA_FPDU);
@ -712,7 +714,7 @@ dissect_mpa_fpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
MPA_ULPDU_LENGTH_LEN, ulpdu_length); MPA_ULPDU_LENGTH_LEN, ulpdu_length);
/* Markers are present in this FPDU */ /* Markers are present in this FPDU */
if (state->minfo[endpoint].valid && num_of_m > 0) { if (num_of_m > 0) {
total_length = fpdu_total_length(tcpinfo); total_length = fpdu_total_length(tcpinfo);