aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-12-22 00:40:38 +0000
committerGuy Harris <guy@alum.mit.edu>2002-12-22 00:40:38 +0000
commit4f02b606b3d5708fb1a5cc9c152ef6ab488df28b (patch)
tree5ed2b03564da900b596b958ec3711fb274525c2a
parent785413e7c00754152fce2b656d0addd6efd89b2e (diff)
The field 2 bytes into a BPDU is always a version identifier, regardless
of the type of the packet; always fetch it. svn path=/trunk/; revision=6815
-rw-r--r--packet-bpdu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/packet-bpdu.c b/packet-bpdu.c
index 607c517003..b7b4c7e519 100644
--- a/packet-bpdu.c
+++ b/packet-bpdu.c
@@ -1,7 +1,7 @@
/* packet-bpdu.c
* Routines for BPDU (Spanning Tree Protocol) disassembly
*
- * $Id: packet-bpdu.c,v 1.42 2002/11/26 10:31:24 jmayer Exp $
+ * $Id: packet-bpdu.c,v 1.43 2002/12/22 00:40:38 guy Exp $
*
* Copyright 1999 Christophe Tronche <ch.tronche@computer.org>
*
@@ -270,11 +270,13 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE);
+
+ protocol_version_identifier = tvb_get_guint8(tvb, BPDU_VERSION_IDENTIFIER);
+
switch (bpdu_type) {
case BPDU_TYPE_CONF:
case BPDU_TYPE_RST:
- protocol_version_identifier = tvb_get_guint8(tvb, BPDU_VERSION_IDENTIFIER);
flags = tvb_get_guint8(tvb, BPDU_FLAGS);
root_identifier_bridge_priority = tvb_get_ntohs(tvb,BPDU_ROOT_IDENTIFIER);
root_identifier_mac = tvb_get_ptr(tvb, BPDU_ROOT_IDENTIFIER + 2, 6);
@@ -285,7 +287,6 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
/* Squelch GCC complaints. */
- protocol_version_identifier = 0;
flags = 0;
root_identifier_bridge_priority = 0;
root_identifier_mac = NULL;