aboutsummaryrefslogtreecommitdiffstats
path: root/packet-bpdu.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-12-22 00:40:38 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2002-12-22 00:40:38 +0000
commit40708e05df8dbd35d82d5da7059c384d13fe9049 (patch)
tree5ed2b03564da900b596b958ec3711fb274525c2a /packet-bpdu.c
parent13801eb23c3daa6d000e6d8b6cb9056ffafb8a9e (diff)
The field 2 bytes into a BPDU is always a version identifier, regardless
of the type of the packet; always fetch it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6815 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-bpdu.c')
-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;