Commit 6db9484b authored by Niels Möller's avatar Niels Möller

* server.c (do_line): Accept client version 1.99, if

DATAFELLOWS_SSH2_GREETING_WORKAROUND is defined.

Rev: src/server.c:1.34
parent d10cf1e9
......@@ -52,6 +52,14 @@
#include <sys/types.h>
#include <sys/socket.h>
/* Datafellows workaround.
*
* It seems that Datafellows' ssh2 client says it want to use protocol
* version 1.99 in its greeting to the server. This behaviour is not
* allowed by the specification. Define this to support it anyway. */
#define DATAFELLOWS_SSH2_GREETING_WORKAROUND
/* Socket workround */
#ifndef SHUTDOWN_WORKS_WITH_UNIX_SOCKETS
......@@ -174,7 +182,11 @@ static struct read_handler *do_line(struct line_handler **h,
if ( (length >= 4) && !memcmp(line, "SSH-", 4))
{
/* Parse and remember format string */
if ((length >= 8) && !memcmp(line + 4, "2.0-", 4))
if ( ((length >= 8) && !memcmp(line + 4, "2.0-", 4))
#ifdef DATAFELLOWS_SSH2_GREETING_WORKAROUND
|| ((length >= 9) && !memcmp(line + 4, "1.99-", 5))
#endif
)
{
struct read_handler *new = make_read_packet
(make_packet_unpad
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment