aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dec-bpdu.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-01-07 00:23:03 +0000
committerGuy Harris <guy@alum.mit.edu>2001-01-07 00:23:03 +0000
commitc6a320d2532ae5e4bc01cd5ee4b097c1e9ee39c1 (patch)
tree518d6603b737cb44fd1d352e058f8b8637560205 /packet-dec-bpdu.c
parent40a67dc59f0a77b3968c88cd4a7afa0b42afa889 (diff)
Update from Paul Ionescu to set the reported length of the tvbuff for
the DEC LanBridge STP packet, so that stuff after the end of the packet gets properly reported as Ethernet trailer data. svn path=/trunk/; revision=2840
Diffstat (limited to 'packet-dec-bpdu.c')
-rw-r--r--packet-dec-bpdu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/packet-dec-bpdu.c b/packet-dec-bpdu.c
index a0a9a82f83..27ec5fac52 100644
--- a/packet-dec-bpdu.c
+++ b/packet-dec-bpdu.c
@@ -1,7 +1,7 @@
/* packet-dec-bpdu.c
* Routines for DEC BPDU (DEC Spanning Tree Protocol) disassembly
*
- * $Id: packet-dec-bpdu.c,v 1.2 2001/01/05 20:46:44 guy Exp $
+ * $Id: packet-dec-bpdu.c,v 1.3 2001/01/07 00:23:03 guy Exp $
*
* Copyright 2001 Paul Ionescu <paul@acorp.ro>
*
@@ -61,6 +61,9 @@
#define BPDU_MAX_AGE 25
#define BPDU_FORWARD_DELAY 26
+#define DEC_BPDU_SIZE 27
+
+
static int proto_dec_bpdu = -1;
static gint ett_dec_bpdu = -1;
@@ -91,13 +94,15 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
else if (bpdu_type == 0x02)
col_add_fstr(pinfo->fd, COL_INFO, "Topology Change Notification");
}
+
+ tvb_set_reported_length(tvb, DEC_BPDU_SIZE);
if (tree) {
protocol_identifier = tvb_get_guint8(tvb, BPDU_DEC_CODE);
protocol_version = tvb_get_guint8(tvb, BPDU_VERSION);
- ti = proto_tree_add_protocol_format(tree, proto_dec_bpdu, tvb, 0, 27,
+ ti = proto_tree_add_protocol_format(tree, proto_dec_bpdu, tvb, 0, DEC_BPDU_SIZE,
"DEC Spanning Tree Protocol");
bpdu_tree = proto_item_add_subtree(ti, ett_dec_bpdu);