aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pcep.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-12-29 00:57:51 +0000
committerGuy Harris <guy@alum.mit.edu>2007-12-29 00:57:51 +0000
commit9a9dd48fa2b898efe07877c84f168a4dfb82571c (patch)
treea5cbacef8261052052c20519c22a0d56ef629b93 /epan/dissectors/packet-pcep.c
parent3f431f9dfbc5f5ee65c594efcf086bb863aa56bf (diff)
According to draft-ietf-pce-pcep-09, the LOAD-BALANCING object has no
TLVs, and has a fixed length; fix the dissector for it to check for an exact length and not to look for TLVs. svn path=/trunk/; revision=23967
Diffstat (limited to 'epan/dissectors/packet-pcep.c')
-rw-r--r--epan/dissectors/packet-pcep.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/epan/dissectors/packet-pcep.c b/epan/dissectors/packet-pcep.c
index f956885655..4ae69e608e 100644
--- a/epan/dissectors/packet-pcep.c
+++ b/epan/dissectors/packet-pcep.c
@@ -1860,7 +1860,7 @@ dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
/*------------------------------------------------------------------------------
* LOAD-BALANCING OBJECT
*------------------------------------------------------------------------------*/
-#define LOAD_BALANCING_OBJ_MIN_LEN 8
+#define LOAD_BALANCING_OBJ_LEN 8
static void
dissect_pcep_balancing_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length)
@@ -1870,10 +1870,10 @@ dissect_pcep_balancing_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offs
guint8 max_LSP;
guint32 min_bandwidth;
- if (obj_length < OBJ_HDR_LEN+LOAD_BALANCING_OBJ_MIN_LEN) {
+ if (obj_length != OBJ_HDR_LEN+LOAD_BALANCING_OBJ_LEN) {
proto_tree_add_text(pcep_object_tree, tvb, offset2, obj_length,
- "Bad LOAD-BALANCING object length %u, should be >= %u", obj_length,
- OBJ_HDR_LEN+LOAD_BALANCING_OBJ_MIN_LEN);
+ "Bad LOAD-BALANCING object length %u, should be %u", obj_length,
+ OBJ_HDR_LEN+LOAD_BALANCING_OBJ_LEN);
return;
}
@@ -1888,11 +1888,6 @@ dissect_pcep_balancing_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offs
min_bandwidth = tvb_get_ntohl(tvb, offset2+4);
proto_tree_add_text(pcep_object_tree, tvb, offset2+4, 4, "Minimun Bandwidth: 0x%08x", min_bandwidth);
-
- /*it's suppose that obj_length is a a valid date. The object can have optional TLV(s)*/
- offset2 += LOAD_BALANCING_OBJ_MIN_LEN;
- obj_length -= OBJ_HDR_LEN+LOAD_BALANCING_OBJ_MIN_LEN;
- dissect_pcep_tlvs(pcep_object_tree, tvb, offset2, obj_length, ett_pcep_obj_load_balancing);
}
/*------------------------------------------------------------------------------