aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dec-bpdu.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-03-19 09:02:01 +0000
committerGuy Harris <guy@alum.mit.edu>2002-03-19 09:02:01 +0000
commit5c42850e62f6c54f0275d115d16f49ae90e32973 (patch)
treef3c1fefc5f76b54164ec3b496ce3f82e908e5bec /packet-dec-bpdu.c
parentb793e3c67de420cdd0c1e103994db723825201d6 (diff)
Use "set_actual_length()" to set the reported length of the packet's
tvbuff, so we don't increase it past what was in the packet. For packets with unknown BPDU types, put the value of the type into the Info column. svn path=/trunk/; revision=4977
Diffstat (limited to 'packet-dec-bpdu.c')
-rw-r--r--packet-dec-bpdu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/packet-dec-bpdu.c b/packet-dec-bpdu.c
index a41a710612..04848763bf 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.12 2002/03/19 08:47:11 guy Exp $
+ * $Id: packet-dec-bpdu.c,v 1.13 2002/03/19 09:02:01 guy Exp $
*
* Copyright 2001 Paul Ionescu <paul@acorp.ro>
*
@@ -137,10 +137,11 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_str(pinfo->cinfo, COL_INFO,
- val_to_str(bpdu_type, bpdu_type_vals, "Unknown (%u)"));
+ val_to_str(bpdu_type, bpdu_type_vals,
+ "Unknown BPDU type (%u)"));
}
- tvb_set_reported_length(tvb, DEC_BPDU_SIZE);
+ set_actual_length(tvb, DEC_BPDU_SIZE);
if (tree) {
ti = proto_tree_add_item(tree, proto_dec_bpdu, tvb, 0, DEC_BPDU_SIZE,