aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-glbp.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-06-19 05:45:40 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-06-19 05:45:40 +0000
commitb3e10e559aba9f14711ac221255ed59047ba9b01 (patch)
tree85a4442848d7e6ab7b3cc2c51d98ab86c110522d /epan/dissectors/packet-glbp.c
parentea64b282678b562695741d3d51e629aebee0891e (diff)
Moved setting of length2 to make it always set.
svn path=/trunk/; revision=28777
Diffstat (limited to 'epan/dissectors/packet-glbp.c')
-rw-r--r--epan/dissectors/packet-glbp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-glbp.c b/epan/dissectors/packet-glbp.c
index 59e5b92525..4535639527 100644
--- a/epan/dissectors/packet-glbp.c
+++ b/epan/dissectors/packet-glbp.c
@@ -152,6 +152,8 @@ dissect_glbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(type2,
glbp_type2_vals, "Type 0x%02x"));
+ length2 = tvb_get_guint8(tvb, 13);
+
if (tree) {
ti = proto_tree_add_item(tree, proto_glbp, tvb, 0, -1, FALSE);
glbp_tree = proto_item_add_subtree(ti, ett_glbp);
@@ -165,7 +167,6 @@ dissect_glbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 12;
proto_tree_add_item(glbp_tree, hf_glbp_type2, tvb, 12, 1, FALSE);
proto_tree_add_item(glbp_tree, hf_glbp_length2, tvb, 13, 1, FALSE);
- length2 = tvb_get_guint8(tvb, 13);
switch(type2) {
case 1: /* Hello */