On 03/18/2016 09:20 AM, Huttunen, Janne (Nokia - FI/Espoo) wrote:
On Thu, 2016-03-10 at 06:31 +0700, EXT Corey Minyard wrote:
<snip>
The only minor thing I noticed that when I used telnet protocol on both ipmi_sim and QEMU side, SoL client seemed to receive some line noise like non-printable characters around the time when the connection was established. Closer examination revealed them to be TCP configuration directives, namely these:IAC DO TRANSMIT-BINARY IAC WILL TRANSMIT-BINARY IAC DON'T ECHO IAC WON'T ECHO That exact sequence is also in sol_telnet_initseq[] in sol.c and from the code it seems to me that it probably gets put into the wrong buffer, which would explain why it is sent to the SoL client instead of the intended target i.e. QEMU.
Oops, yes, it sticks it in the wrong buffer. inbuf and outbuf are bad named here, really, as each goes in from one place and out to another. The attached patch should fix it, already pushed up. Thanks, -corey
>From 34379f46e64d963517d181797178727e68404bfa Mon Sep 17 00:00:00 2001 From: Corey Minyard <[email protected]> Date: Fri, 18 Mar 2016 16:15:24 -0500 Subject: [PATCH] lanserv:sol: Put the telnet init sequence in the right buffer It was going to the sol connection, not the telnet connection. Signed-off-by: Corey Minyard <[email protected]> --- lanserv/sol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lanserv/sol.c b/lanserv/sol.c index 51ab39e..8cc2321 100644 --- a/lanserv/sol.c +++ b/lanserv/sol.c @@ -1060,8 +1060,8 @@ sol_port_init(ipmi_sol_t *sol) if (sol->do_telnet) { int len = sizeof(sol_telnet_initseq); - memcpy(sd->outbuf, sol_telnet_initseq, len); - sd->outlen = len; + memcpy(sd->inbuf, sol_telnet_initseq, len); + sd->inlen = len; sd->write_enabled = 1; } -- 1.8.2.3
------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________ Openipmi-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openipmi-developer
