vlib: extend telnet protocol guard 13/28213/3
authorVladimir Isaev <visaev@netgate.com>
Tue, 11 Aug 2020 14:15:58 +0000 (17:15 +0300)
committerMatthew Smith <mgsmith@netgate.com>
Mon, 31 Aug 2020 20:43:34 +0000 (20:43 +0000)
There is a number of TERMs with big length, such as
'screen.konsole-256color' (23). These TERMs can not
be processed properly by vpp because maximum telnet
byte stream supported is 24 and we need 6 more service
bytes to send TTYPE.

So I extended maximum depth guard to 32.

Type: fix
Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I9ca506996a97e9567d06483c5f020d6cc394329c

src/vlib/unix/cli.c

index 5979dbd..e98eb34 100644 (file)
@@ -92,7 +92,7 @@
 
 /** Maximum depth into a byte stream from which to compile a Telnet
  * protocol message. This is a safety measure. */
-#define UNIX_CLI_MAX_DEPTH_TELNET 24
+#define UNIX_CLI_MAX_DEPTH_TELNET 32
 
 /** Maximum terminal width we will accept */
 #define UNIX_CLI_MAX_TERMINAL_WIDTH 512