]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't print the SPB stuff in non-verbose mode.
authorGuy Harris <[email protected]>
Wed, 27 Mar 2013 08:18:58 +0000 (01:18 -0700)
committerGuy Harris <[email protected]>
Wed, 27 Mar 2013 08:19:28 +0000 (01:19 -0700)
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.

print-stp.c

index 8c20d5832cf2fecf71407d385b6c902da3b82c51..1b6f38f8fa5fd670c0cb741a39cfe2288342c94a 100644 (file)
@@ -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),