aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iwarp-mpa.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2018-08-22 22:44:27 +0200
committerStefan Metzmacher <metze@samba.org>2021-04-29 14:37:07 +0200
commit92faecc3f76479046406497081c5fd0fa823f5ff (patch)
treeeb0abd7bae785093096cf9e7466ce7f78eb265b7 /epan/dissectors/packet-iwarp-mpa.c
parent16988d2b4f4bca2b9564b19debdd90577b4b52ea (diff)
packet-iwarp-mpa.c: fix mpa_fpdu dissecting without marker pdu fragmentation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'epan/dissectors/packet-iwarp-mpa.c')
-rw-r--r--epan/dissectors/packet-iwarp-mpa.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c
index 2e14c1e1dd..ce1a0db6f7 100644
--- a/epan/dissectors/packet-iwarp-mpa.c
+++ b/epan/dissectors/packet-iwarp-mpa.c
@@ -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.
*/
pad_length = fpdu_pad_length(ulpdu_length);
- exp_ulpdu_length = expected_ulpdu_length(state, tcpinfo, endpoint);
- if (!exp_ulpdu_length || exp_ulpdu_length != (ulpdu_length + pad_length)) {
- return 0;
+ if (num_of_m > 0) {
+ exp_ulpdu_length = expected_ulpdu_length(state, tcpinfo, endpoint);
+ if (!exp_ulpdu_length || exp_ulpdu_length != (ulpdu_length + pad_length)) {
+ return 0;
+ }
}
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);
/* 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);