Bugfix from Carles Kishimoto <carles.kishimoto@gmail.com>:
authorhannes <hannes>
Sun, 18 Mar 2007 17:12:36 +0000 (17:12 +0000)
committerhannes <hannes>
Sun, 18 Mar 2007 17:12:36 +0000 (17:12 +0000)
the port and prio fields of mstp PDUs need to be properly shifted.

print-stp.c

index c704b1c657dec580cb1ee54b7d19ae9c03e7543e..caceba9a00ad51854039c38cd4eb0f32cd0d56d0 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.13.2.6 2007-03-09 18:59:48 hannes Exp $";
+"@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.13.2.7 2007-03-18 17:12:36 hannes Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -267,8 +267,8 @@ stp_print_mstp_bpdu(const struct stp_bpdu_ *stp_bpdu, u_int length)
                    EXTRACT_32BITS(ptr + offset +
                                   MST_BPDU_MSTI_ROOT_PATH_COST_OFFSET));
             printf("\n\t\tMSTI bridge-prio %d, port-prio %d, hops %d",
-                   ptr[offset + MST_BPDU_MSTI_BRIDGE_PRIO_OFFSET],
-                   ptr[offset + MST_BPDU_MSTI_PORT_PRIO_OFFSET],
+                   ptr[offset + MST_BPDU_MSTI_BRIDGE_PRIO_OFFSET] >> 4,
+                   ptr[offset + MST_BPDU_MSTI_PORT_PRIO_OFFSET] >> 4,
                    ptr[offset + MST_BPDU_MSTI_REMAIN_HOPS_OFFSET]);
 
             len -= MST_BPDU_MSTI_LENGTH;