aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-11-25 00:32:23 -0500
committerAnders Broman <a.broman58@gmail.com>2017-11-25 09:04:00 +0000
commitf23a6e193f90a02542c85cad07cb073abd6eb678 (patch)
treef09fb9057a687b6f9eb529cf305bc19b0bf39050
parentd2a7a806ff811628eb75e415c8811600420b14d5 (diff)
packet-iwarp-mpa.c: Stop FPDU dissection if the ULPDU_LENGTH field does NOT contain what is expected
Bug: 14236 Change-Id: I15f1bc70978d1e5ae3b4bba1ff87b590726cfaa1 Reviewed-on: https://code.wireshark.org/review/24578 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-iwarp-mpa.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c
index 346f28c..f6d7a72 100644
--- a/epan/dissectors/packet-iwarp-mpa.c
+++ b/epan/dissectors/packet-iwarp-mpa.c
@@ -687,8 +687,6 @@ dissect_mpa_fpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* get ULPDU length of this FPDU */
ulpdu_length = (guint16) tvb_get_ntohs(tvb, offset);
- mpa_packetlist(pinfo, MPA_FPDU);
-
if (state->minfo[endpoint].valid) {
num_of_m = number_of_markers(state, tcpinfo, endpoint);
}
@@ -707,12 +705,11 @@ dissect_mpa_fpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
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)) {
- proto_tree_add_expert_format(tree, pinfo, &ei_mpa_bad_length, tvb, offset,
- MPA_ULPDU_LENGTH_LEN,
- "[ULPDU length [%u] field does not contain the expected length[%u]]",
- exp_ulpdu_length, ulpdu_length + pad_length);
+ return 0;
}
+ mpa_packetlist(pinfo, MPA_FPDU);
+
mpa_item = proto_tree_add_item(tree, proto_iwarp_mpa, tvb, 0,
-1, ENC_NA);
mpa_tree = proto_item_add_subtree(mpa_item, ett_mpa);