]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Print *something* for Telnet regardless of the -q/-v flags.
authorGuy Harris <[email protected]>
Sun, 19 Oct 2014 20:01:59 +0000 (13:01 -0700)
committerGuy Harris <[email protected]>
Sun, 19 Oct 2014 20:01:59 +0000 (13:01 -0700)
For -q, just print "[telnet]".  Without -v, at least print the
negotiation.

print-tcp.c
print-telnet.c

index afd093950c4f6cd6effcb5e2864437358b7c89c3..22599b94dba8710bc566ab643f555aa80a72ba94 100644 (file)
@@ -674,8 +674,7 @@ tcp_print(netdissect_options *ndo,
         }
 
         if (sport == TELNET_PORT || dport == TELNET_PORT) {
-                if (!ndo->ndo_qflag && ndo->ndo_vflag)
-                        telnet_print(ndo, bp, length);
+                telnet_print(ndo, bp, length);
         } else if (sport == SMTP_PORT || dport == SMTP_PORT) {
                 ND_PRINT((ndo, ": "));
                 smtp_print(ndo, bp, length);
index 6a2680b413c8140a76e7da4f017fb342194b8898..7c5a737d33252d8e3f2c59d3a8cabdcfca132bc3 100644 (file)
@@ -509,6 +509,11 @@ telnet_print(netdissect_options *ndo, const u_char *sp, u_int length)
 
        osp = sp;
 
+       if (ndo->ndo_qflag) {
+               ND_PRINT((ndo, "[telnet]"));
+               return;
+       }
+
        while (length > 0 && *sp == IAC) {
                l = telnet_parse(ndo, sp, length, 0);
                if (l < 0)