X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/060dd7022db19b46ef474b646a1325b82991b503..refs/pull/433/head:/print-telnet.c diff --git a/print-telnet.c b/print-telnet.c index 7c5a737d..fa59b1fe 100644 --- a/print-telnet.c +++ b/print-telnet.c @@ -509,12 +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) { + /* + * Parse the Telnet command without printing it, + * to determine its length. + */ l = telnet_parse(ndo, sp, length, 0); if (l < 0) break;