]> andersk Git - openssh.git/blobdiff - packet.c
- stevesk@cvs.openbsd.org 2002/01/24 21:13:23
[openssh.git] / packet.c
index 5d97c379edf9c505441f1e76667e76184253776e..e334c4b6933a2d1caf6d97522d59adb1cba7d21e 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.83 2001/12/29 21:56:01 stevesk Exp $");
+RCSID("$OpenBSD: packet.c,v 1.87 2002/01/24 21:13:23 stevesk Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
@@ -59,6 +59,7 @@ RCSID("$OpenBSD: packet.c,v 1.83 2001/12/29 21:56:01 stevesk Exp $");
 #include "mac.h"
 #include "log.h"
 #include "canohost.h"
+#include "misc.h"
 
 #ifdef PACKET_DEBUG
 #define DBG(x) x
@@ -130,8 +131,8 @@ packet_set_connection(int fd_in, int fd_out)
                fatal("packet_set_connection: cannot load cipher 'none'");
        connection_in = fd_in;
        connection_out = fd_out;
-       cipher_init(&send_context, none, (u_char *) "", 0, NULL, 0);
-       cipher_init(&receive_context, none, (u_char *) "", 0, NULL, 0);
+       cipher_init(&send_context, none, "", 0, NULL, 0);
+       cipher_init(&receive_context, none, "", 0, NULL, 0);
        newkeys[MODE_IN] = newkeys[MODE_OUT] = NULL;
        if (!initialized) {
                initialized = 1;
@@ -892,7 +893,7 @@ packet_read_poll2(u_int32_t *seqnr_p)
 int
 packet_read_poll_seqnr(u_int32_t *seqnr_p)
 {
-       int reason;
+       int reason, seqnr;
        u_char type;
        char *msg;
 
@@ -920,6 +921,10 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
                                xfree(msg);
                                fatal_cleanup();
                                break;
+                       case SSH2_MSG_UNIMPLEMENTED:
+                               seqnr = packet_get_int();
+                               debug("Received SSH2_MSG_UNIMPLEMENTED for %d", seqnr);
+                               break;
                        default:
                                return type;
                                break;
@@ -1187,7 +1192,6 @@ packet_set_interactive(int interactive)
        int lowdelay = IPTOS_LOWDELAY;
        int throughput = IPTOS_THROUGHPUT;
 #endif
-       int on = 1;
 
        if (called)
                return;
@@ -1215,9 +1219,7 @@ packet_set_interactive(int interactive)
                                    strerror(errno));
                }
 #endif
-               if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on,
-                   sizeof(on)) < 0)
-                       error("setsockopt TCP_NODELAY: %.100s", strerror(errno));
+               set_nodelay(connection_in);
        } else if (packet_connection_is_ipv4()) {
                /*
                 * Set IP options for a non-interactive connection.  Use
This page took 0.035256 seconds and 4 git commands to generate.