Skip to content

PUTTY broken on snapshot builds #2563

@mcspr

Description

@mcspr

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)

const auto* payload = reinterpret_cast<const char*>(pb->payload);
espurna::terminal::LineView lines({payload, payload + pb->len});

// 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions