diff options
author | Michael Mann <mmann78@netscape.net> | 2016-07-21 10:21:25 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-07-27 03:40:02 +0000 |
commit | 8b0e9c66728f6a39bbe3ada1029e13ad1378013a (patch) | |
tree | c0c1b4da1845069520d4e131db96e6143e4ca772 /epan/dissectors/packet-extreme.c | |
parent | b7f1e99f7f4c75fa4bac1ccba77087fb0e50b8ac (diff) |
Follow up for proto_tree_add_checksum.
Fill in the "gaps" so that all dissectors that verify checksums have both a
status and expert info field.
Also address comments from original proto_tree_add_checksum patch that didn't make it.
Ping-Bug: 8859
Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f
Reviewed-on: https://code.wireshark.org/review/16590
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-extreme.c')
-rw-r--r-- | epan/dissectors/packet-extreme.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-extreme.c b/epan/dissectors/packet-extreme.c index 17a39e52e5..4d7d34a9ee 100644 --- a/epan/dissectors/packet-extreme.c +++ b/epan/dissectors/packet-extreme.c @@ -252,6 +252,7 @@ static int hf_edp_unknown_data = -1; static int hf_edp_null = -1; static expert_field ei_edp_short_tlv = EI_INIT; +static expert_field ei_edp_checksum = EI_INIT; static gint ett_edp = -1; static gint ett_edp_tlv_header = -1; @@ -983,10 +984,10 @@ dissect_edp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) /* Checksum from version to null tlv */ SET_CKSUM_VEC_TVB(cksum_vec[0], tvb, 0, data_length); - proto_tree_add_checksum(edp_tree, tvb, offset, hf_edp_checksum, hf_edp_checksum_status, NULL, pinfo, in_cksum(&cksum_vec[0], 1), + proto_tree_add_checksum(edp_tree, tvb, offset, hf_edp_checksum, hf_edp_checksum_status, &ei_edp_checksum, pinfo, in_cksum(&cksum_vec[0], 1), ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY|PROTO_CHECKSUM_IN_CKSUM); } else { - proto_tree_add_checksum(edp_tree, tvb, offset, hf_edp_checksum, hf_edp_checksum_status, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS); + proto_tree_add_checksum(edp_tree, tvb, offset, hf_edp_checksum, hf_edp_checksum_status, &ei_edp_checksum, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS); } offset += 2; @@ -1440,6 +1441,7 @@ proto_register_edp(void) static ei_register_info ei[] = { { &ei_edp_short_tlv, { "edp.short_tlv", PI_MALFORMED, PI_ERROR, "TLV is too short", EXPFILL }}, + { &ei_edp_checksum, { "edp.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }}, }; expert_module_t* expert_edp; |