Skip to content
  • rswindell's avatar
    Received-telnet command improvements: · 2b1bccc2
    rswindell authored
    - If a telnet command was received in multiple packets, the memcpy optimization
      in telnet_interpret() would skip/drop all bytes in the subsequent pkt payload
      before an IAC char. Don't optimize when in the middle of a telnet command.
    - If a received telnet command exceeds the telnet_cmd buffer, reset the
      received telnet_cmdlen and log a warning-level message
    - If a telnet sub-negotiation END command is received as the beginning of a
      new telnet command, log a warning-level message and reset the telnet_cmdlen.
    
    This fixes the occasional problem observed when using fTelnet and its sending
    the "SEND-LOCATION" sub-neg command split between 2 TCP packets. Only
    part of the first packet would be used as the location data and the rest
    processed as input from the users (e.g. as the Login: prompt). Thanks, Ree!
    2b1bccc2