[Libssh] [PATCH] Solved unknown packet type 0....
Matt Lawson
lawson08 at yahoo.com
Sat May 10 01:48:13 CEST 2008
Recap: I set up a libssh server, then would try to
connect to it. If I was using a libssh client, it
would miss the first part of the data transmitted (1
character or more) and I would also see a "Ignored
packet type 0".
If I connected with a normal ssh command line, it
would also report an unknown packet type 0 and crash.
What was occurring is during the connection setup,
when the server is calling ssh_message_get() to
determine things like opening a channel, and answering
things like channel open and shell requests, packets
of type SSH2_MSG_CHANNEL_DATA (94) were sometimes
showing up. There was no case to handle this, so the
default action sent back something that was bad to the
client.
So I added a case for channel data and had it call
channel_handle() for it. It seems to work, and it
doesn't lose the first data like it did before.
Whether this was just an oversight or a symptom of
messages coming in the "wrong" order I'm not sure.
But the fact that the libssh client and the ssh
command line both experienced similar problems, and
they are both fixed after the patch, makes me think
it's a good patch.
- matt
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: messages.c.patch
Type: application/octet-stream
Size: 536 bytes
Desc: 758598748-messages.c.patch
Url : http://www.cerkinfo.be/pipermail/libssh/attachments/20080509/9080d757/attachment.obj
More information about the Libssh
mailing list