]> andersk Git - openssh.git/blobdiff - packet.c
Oops.. =) mispelt NGROUPS_MAX.
[openssh.git] / packet.c
index cd42f2f75e82cd076383535870368f19598afc18..53495b9337196077add8d2c094e4be9fb584e548 100644 (file)
--- a/packet.c
+++ b/packet.c
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.42 2001/01/09 21:19:50 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.46 2001/01/21 19:05:53 markus Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
 #include "packet.h"
 #include "bufaux.h"
-#include "ssh.h"
 #include "crc32.h"
 #include "getput.h"
 
@@ -52,6 +51,7 @@ RCSID("$OpenBSD: packet.c,v 1.42 2001/01/09 21:19:50 markus Exp $");
 #include "channels.h"
 
 #include "compat.h"
+#include "ssh1.h"
 #include "ssh2.h"
 
 #include <openssl/bn.h>
@@ -61,6 +61,8 @@ RCSID("$OpenBSD: packet.c,v 1.42 2001/01/09 21:19:50 markus Exp $");
 #include "cipher.h"
 #include "kex.h"
 #include "hmac.h"
+#include "log.h"
+#include "canohost.h"
 
 #ifdef PACKET_DEBUG
 #define DBG(x) x
@@ -1230,22 +1232,23 @@ packet_not_very_much_data_to_write()
 /* Informs that the current session is interactive.  Sets IP flags for that. */
 
 void
-packet_set_interactive(int interactive, int keepalives)
+packet_set_interactive(int interactive)
 {
+       static int called = 0;
+       int lowdelay = IPTOS_LOWDELAY;
+       int throughput = IPTOS_THROUGHPUT;
        int on = 1;
 
+       if (called)
+               return;
+       called = 1;
+
        /* Record that we are in interactive mode. */
        interactive_mode = interactive;
 
        /* Only set socket options if using a socket.  */
        if (!packet_connection_is_on_socket())
                return;
-       if (keepalives) {
-               /* Set keepalives if requested. */
-               if (setsockopt(connection_in, SOL_SOCKET, SO_KEEPALIVE, (void *) &on,
-                   sizeof(on)) < 0)
-                       error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
-       }
        /*
         * IPTOS_LOWDELAY and IPTOS_THROUGHPUT are IPv4 only
         */
@@ -1256,10 +1259,9 @@ packet_set_interactive(int interactive, int keepalives)
                 */
 #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
                if (packet_connection_is_ipv4()) {
-                       int lowdelay = IPTOS_LOWDELAY;
-                       if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, 
+                       if (setsockopt(connection_in, IPPROTO_IP, IP_TOS,
                            (void *) &lowdelay, sizeof(lowdelay)) < 0)
-                               error("setsockopt IPTOS_LOWDELAY: %.100s", 
+                               error("setsockopt IPTOS_LOWDELAY: %.100s",
                                    strerror(errno));
                }
 #endif
@@ -1272,7 +1274,6 @@ packet_set_interactive(int interactive, int keepalives)
                 * IPTOS_THROUGHPUT.
                 */
 #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
-               int throughput = IPTOS_THROUGHPUT;
                if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput,
                    sizeof(throughput)) < 0)
                        error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno));
This page took 0.605836 seconds and 4 git commands to generate.