]> The Tcpdump Group git mirrors - tcpdump/commitdiff
avoid double printing of "unknown proto" message
authorhannes <hannes>
Thu, 24 Nov 2005 07:42:53 +0000 (07:42 +0000)
committerhannes <hannes>
Thu, 24 Nov 2005 07:42:53 +0000 (07:42 +0000)
print-chdlc.c

index 7354dc7203e456ed233494c282a3c2c1dcea963a..8de7374828cadb70f6218415f1a005d32aca6e2b 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.41 2005-11-04 18:30:21 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.42 2005-11-24 07:42:53 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -110,7 +110,8 @@ chdlc_print(register const u_char *p, u_int length) {
                     isoclns_print(p+CHDLC_HDRLEN, length, length);
                 break;
        default:
-                printf("unknown CHDLC protocol (0x%04x)", proto);
+                if (!eflag)
+                        printf("unknown CHDLC protocol (0x%04x)", proto);
                 break;
        }