summaryrefslogtreecommitdiff
path: root/print-stp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-03-27 01:18:58 -0700
committerGuy Harris <guy@alum.mit.edu>2013-03-27 01:18:58 -0700
commit1b0c892902a89f8b684e36c7993e93309ff6144f (patch)
tree97839ec6c55eb156f720fc38cc2bd32ef76b5ef5 /print-stp.c
parenta42db1cd0feab41d1acce910ebbb12cc1ba6de05 (diff)
downloadtcpdump-1b0c892902a89f8b684e36c7993e93309ff6144f.tar.gz
Don't print the SPB stuff in non-verbose mode.
Before the previous change, we didn't print it; restore that behavior. Also update a comment - DEFAULT_SNAPLEN is now pretty large, so we should capture the entire packet by default.
Diffstat (limited to 'print-stp.c')
-rw-r--r--print-stp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/print-stp.c b/print-stp.c
index 8c20d583..1b6f38f8 100644
--- a/print-stp.c
+++ b/print-stp.c
@@ -247,8 +247,7 @@ stp_print_mstp_bpdu(const struct stp_bpdu_ *stp_bpdu, u_int length)
bittok2str(stp_bpdu_flag_values, "none", stp_bpdu->flags), length);
/*
- * in non-verbose mode just print the flags. We dont read that much
- * of the packet (DEFAULT_SNAPLEN) to print out cist bridge-id
+ * in non-verbose mode just print the flags.
*/
if (!vflag) {
return;
@@ -327,6 +326,13 @@ stp_print_spb_bpdu(const struct stp_bpdu_ *stp_bpdu, u_int offset)
{
const u_char *ptr;
+ /*
+ * in non-verbose mode don't print anything.
+ */
+ if (!vflag) {
+ return;
+ }
+
ptr = (const u_char *)stp_bpdu;
printf("\n\tv4len %d AUXMCID Name %s, Rev %u, \n\t\tdigest %08x%08x%08x%08x",
EXTRACT_16BITS (ptr + offset),