ziutek / telnet

Package to handle a telnet connection
Other
141 stars 60 forks source link

Make window size negotiation RFC-compliant #24

Closed cheesestraws closed 1 month ago

cheesestraws commented 1 month ago

Per RFC1073 section 2, the width and the height are two bytes each, but "any occurrence of 255 in the subnegotiation must be doubled to distinguish it from the IAC character (which has a value of 255).". So we need to send eight 255 bytes for a 65535x65535 terminal, not four.

For some reason, recent versions of Mikrotik RouterOS have started really caring about this.