summaryrefslogtreecommitdiff
path: root/epan/dissectors
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2014-07-10 20:41:15 -0700
committerAnders Broman <a.broman58@gmail.com>2014-07-11 04:39:16 +0000
commitbc8e095ec8b7a3b69412b09c129f3635c732d357 (patch)
treeae08b57e9fdb77b907e6724d0b085e320833dd6e /epan/dissectors
parent71ebdb67ad3ea594ec4bbd889f5517f787519378 (diff)
downloadwireshark-bc8e095ec8b7a3b69412b09c129f3635c732d357.tar.gz
Update to fix for Bug 6302.
There is no need to check block constraints as min length already guarantees this, this also fixes false positives for missing TOS metric blocks Change-Id: Icbe3067d2506fad1c7dbcb175d932a5f242fa5cd Signed-off-by: Anish Bhatt <anish@chelsio.com> Reviewed-on: https://code.wireshark.org/review/2995 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-ospf.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index 6d1b44b665..8d7794ba70 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -2513,15 +2513,9 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *t
}
nr_links = tvb_get_ntohs(tvb, offset + 2);
- /* ti =*/ proto_tree_add_item(ospf_lsa_tree, hf_ospf_lsa_number_of_links, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(ospf_lsa_tree, hf_ospf_lsa_number_of_links, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
-/* This constraint (>=0) makes no sense
- * if (nr_links < 0) {
- * expert_add_info_format(pinfo, ti, &ei_ospf_lsa_constraint_missing, "(>= 0 link descriptors required");
- * break;
- * }
- */
+ offset += 4;
/* nr_links links follow
* maybe we should put each of the links into its own subtree ???
@@ -2602,9 +2596,6 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *t
tvb_get_ntoh24(tvb, offset + 1));
offset += 4;
- if (offset == end_offset)
- expert_add_info_format(pinfo, ti, &ei_ospf_lsa_constraint_missing, "(>= 1 TOS metric blocks required");
-
/* Metric specific information, if any */
while (offset < end_offset) {
proto_tree_add_text(ospf_lsa_tree, tvb, offset, 4, "%s: %u, Metric: %u",