]> andersk Git - openssh.git/blobdiff - dispatch.c
- (djm) Update config.guess and config.sub with latest versions (from
[openssh.git] / dispatch.c
index 3daac20224d5999e7b10a67a66a403b3672692de..7168d1c741a42263ff1fd6c7109e9948215a14d6 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: dispatch.c,v 1.4 2000/09/07 20:27:51 deraadt Exp $");
-#include "ssh.h"
+RCSID("$OpenBSD: dispatch.c,v 1.10 2001/02/18 18:33:53 markus Exp $");
+
+#include "ssh1.h"
+#include "ssh2.h"
+#include "log.h"
 #include "dispatch.h"
 #include "packet.h"
+#include "compat.h"
 
 #define DISPATCH_MIN   0
 #define DISPATCH_MAX   255
@@ -33,9 +37,11 @@ RCSID("$OpenBSD: dispatch.c,v 1.4 2000/09/07 20:27:51 deraadt Exp $");
 dispatch_fn *dispatch[DISPATCH_MAX];
 
 void
-dispatch_protocol_error(int type, int plen)
+dispatch_protocol_error(int type, int plen, void *ctxt)
 {
        error("Hm, dispatch protocol error: type %d plen %d", type, plen);
+       if (compat20 && type == SSH2_MSG_KEXINIT)
+               fatal("dispatch_protocol_error: rekeying is not supported");
 }
 void
 dispatch_init(dispatch_fn *dflt)
@@ -50,7 +56,7 @@ dispatch_set(int type, dispatch_fn *fn)
        dispatch[type] = fn;
 }
 void
-dispatch_run(int mode, int *done)
+dispatch_run(int mode, int *done, void *ctxt)
 {
        for (;;) {
                int plen;
@@ -64,9 +70,9 @@ dispatch_run(int mode, int *done)
                                return;
                }
                if (type > 0 && type < DISPATCH_MAX && dispatch[type] != NULL)
-                       (*dispatch[type])(type, plen);
+                       (*dispatch[type])(type, plen, ctxt);
                else
-                       packet_disconnect("protocol error: rcvd type %d", type);        
+                       packet_disconnect("protocol error: rcvd type %d", type);
                if (done != NULL && *done)
                        return;
        }
This page took 0.056527 seconds and 4 git commands to generate.