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;