]> andersk Git - gssapi-openssh.git/blobdiff - openssh/serverloop.c
openssh-4.3p2-hpn12.diff
[gssapi-openssh.git] / openssh / serverloop.c
index b60932f0d0f8fe6798da0db1519b1d8eb4e6828a..5eb5fd565cf57c474fd055d1589fc68350809892 100644 (file)
@@ -907,9 +907,14 @@ server_request_direct_tcpip(void)
        xfree(originator);
        if (sock < 0)
                return NULL;
-       c = channel_new("direct-tcpip", SSH_CHANNEL_CONNECTING,
-           sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT,
-           CHAN_TCP_PACKET_DEFAULT, 0, "direct-tcpip", 1);
+       if (options.hpn_disabled)
+               c = channel_new("direct-tcpip", SSH_CHANNEL_CONNECTING,
+                   sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT,
+                   CHAN_TCP_PACKET_DEFAULT, 0, "direct-tcpip", 1);
+       else
+               c = channel_new("direct-tcpip", SSH_CHANNEL_CONNECTING,
+                   sock, sock, -1, options.hpn_buffer_size,
+                   CHAN_TCP_PACKET_DEFAULT, 0, "direct-tcpip", 1);
        return c;
 }
 
@@ -944,8 +949,12 @@ server_request_tun(void)
        sock = tun_open(tun, mode);
        if (sock < 0)
                goto done;
-       c = channel_new("tun", SSH_CHANNEL_OPEN, sock, sock, -1,
-           CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
+       if (options.hpn_disabled)
+               c = channel_new("tun", SSH_CHANNEL_OPEN, sock, sock, -1,
+                   CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
+       else
+               c = channel_new("tun", SSH_CHANNEL_OPEN, sock, sock, -1,
+                   options.hpn_buffer_size, CHAN_TCP_PACKET_DEFAULT, 0, "tun", 1);
        c->datagram = 1;
 #if defined(SSH_TUN_FILTER)
        if (mode == SSH_TUNMODE_POINTOPOINT)
@@ -975,7 +984,7 @@ server_request_session(void)
        c = channel_new("session", SSH_CHANNEL_LARVAL,
            -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT,
            0, "server-session", 1);
-       if (!(datafellows & SSH_BUG_LARGEWINDOW))
+       if ((options.tcp_rcv_buf_poll > 0) && (!options.hpn_disabled))
                c->dynamic_window = 1;
        if (session_open(the_authctxt, c->self) != 1) {
                debug("session open failed, free channel %d", c->self);
@@ -1073,7 +1082,8 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
                } else {
                        /* Start listening on the port */
                        success = channel_setup_remote_fwd_listener(
-                           listen_address, listen_port, options.gateway_ports);
+                           listen_address, listen_port, options.gateway_ports, 
+                           options.hpn_disabled, options.hpn_buffer_size);
                }
                xfree(listen_address);
        } else if (strcmp(rtype, "cancel-tcpip-forward") == 0) {
This page took 0.08368 seconds and 4 git commands to generate.