-
Notifications
You must be signed in to change notification settings - Fork 634
Description
See #2562
(and possibly any other 'interactive' client that splits data packets like PUTTY does)
Server processing ignores special TELNET newlines sent by PUTTY (fixed in PUTTY config, though)
Server processing ignores packets without newlines (either \r\n
or \n
)
espurna/code/espurna/telnet.cpp
Lines 538 to 540 in 988a972
const auto* payload = reinterpret_cast<const char*>(pb->payload); | |
espurna::terminal::LineView lines({payload, payload + pb->len}); | |
espurna/code/espurna/telnet.cpp
Lines 569 to 574 in 988a972
// Right now, only accept simple payloads that are limited by TCP_MSS | |
// In case there are more than one `pbuf` chained together, we discrard | |
// everything else and only use the first available one | |
// (and, only if it contains line breaks; everything else is lost) | |
tcp_recved(_pcb, pb->tot_len); | |
pbuf_free(pb); |
We get two packets instead of one, like with nmap-nc or busybox implementation
121 20:55:15,033230 HOST ESP8266 TELNET 59 Telnet Data ...
> hello
122 20:55:15,033380 HOST ESP8266 TELNET 56 Telnet Data ...
> \r\n
I see no option in putty to not do this kind of stuff, but it is possible there is something
Algorithm above could either feed internal parser repeatedly, or keep our pbufs for some amount of time and repeat parsing line-like data once more... data is available
Server also always sends \n
, but this is mostly a config issue (implicit CR after LF)