]> andersk Git - openssh.git/blobdiff - packet.c
- deraadt@cvs.openbsd.org 2006/03/20 18:48:34
[openssh.git] / packet.c
index c855970fc7d151e1e31e52208ba916c1a71b4185..ee9369638f43fb15930c9e8d6445947afcd95fe4 100644 (file)
--- a/packet.c
+++ b/packet.c
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.118 2005/07/25 11:59:39 markus Exp $");
-
 #include "openbsd-compat/sys-queue.h"
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
 
 #include "xmalloc.h"
 #include "buffer.h"
@@ -258,6 +259,7 @@ packet_get_keyiv_len(int mode)
 
        return (cipher_get_keyiv_len(cc));
 }
+
 void
 packet_set_iv(int mode, u_char *dat)
 {
@@ -270,6 +272,7 @@ packet_set_iv(int mode, u_char *dat)
 
        cipher_set_keyiv(cc, dat);
 }
+
 int
 packet_get_ssh1_cipher(void)
 {
@@ -471,31 +474,37 @@ packet_put_char(int value)
 
        buffer_append(&outgoing_packet, &ch, 1);
 }
+
 void
 packet_put_int(u_int value)
 {
        buffer_put_int(&outgoing_packet, value);
 }
+
 void
 packet_put_string(const void *buf, u_int len)
 {
        buffer_put_string(&outgoing_packet, buf, len);
 }
+
 void
 packet_put_cstring(const char *str)
 {
        buffer_put_cstring(&outgoing_packet, str);
 }
+
 void
 packet_put_raw(const void *buf, u_int len)
 {
        buffer_append(&outgoing_packet, buf, len);
 }
+
 void
 packet_put_bignum(BIGNUM * value)
 {
        buffer_put_bignum(&outgoing_packet, value);
 }
+
 void
 packet_put_bignum2(BIGNUM * value)
 {
@@ -572,7 +581,7 @@ packet_send1(void)
        buffer_clear(&outgoing_packet);
 
        /*
-        * Note that the packet is now only buffered in output.  It won\'t be
+        * Note that the packet is now only buffered in output.  It won't be
         * actually sent until packet_write_wait or packet_write_poll is
         * called.
         */
@@ -671,6 +680,7 @@ packet_enable_delayed_compress(void)
        for (mode = 0; mode < MODE_MAX; mode++) {
                comp = &newkeys[mode]->comp;
                if (comp && !comp->enabled && comp->type == COMP_DELAYED) {
+                       packet_init_compression();
                        if (mode == MODE_OUT)
                                buffer_compress_init_send(6);
                        else
@@ -1186,7 +1196,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
                                break;
                        default:
                                return type;
-                               break;
                        }
                } else {
                        type = packet_read_poll1();
@@ -1209,7 +1218,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
                                if (type)
                                        DBG(debug("received packet type %d", type));
                                return type;
-                               break;
                        }
                }
        }
@@ -1479,8 +1487,7 @@ packet_set_interactive(int interactive)
        /* Only set socket options if using a socket.  */
        if (!packet_connection_is_on_socket())
                return;
-       if (interactive)
-               set_nodelay(connection_in);
+       set_nodelay(connection_in);
        packet_set_tos(interactive);
 }
 
This page took 0.037127 seconds and 4 git commands to generate.