Subject: [PATCH] Follow RFC4253 section 11.4

[PATCH] Follow RFC4253 section 11.4

From: Steven Dake <sdake_at_redhat.com>
Date: Mon, 27 Feb 2012 20:58:43 -0700

11.4. Reserved Messages

   An implementation MUST respond to all unrecognized messages with an
   SSH_MSG_UNIMPLEMENTED message in the order in which the messages were
   received. Such messages MUST be otherwise ignored. Later protocol
   versions may define other meanings for these message types.

      byte SSH_MSG_UNIMPLEMENTED
      uint32 packet sequence number of rejected message

Signed-off-by: Steven Dake <sdake_at_redhat.com>

---
 src/packet.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/packet.c b/src/packet.c
index 5852d0c..882940c 100644
--- a/src/packet.c
+++ b/src/packet.c
@@ -522,6 +522,11 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
             session->packAdd_state = libssh2_NB_state_idle;
             return 0;
 
+        case SSH_MSG_UNIMPLEMENTED:
+            LIBSSH2_FREE(session, data);
+            session->packAdd_state = libssh2_NB_state_idle;
+            return 0;
+
             /*
               byte      SSH_MSG_DEBUG
               boolean   always_display
-- 
1.7.7.6
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-02-28