]> andersk Git - gssapi-openssh.git/blobdiff - openssh/sshd.c
http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.2p1-hpn13v6.diff.gz committe...
[gssapi-openssh.git] / openssh / sshd.c
index 4228ca55046d1d7b1edd5541fdcb4f5554bdaad9..1770ca33c081da6e3a32dd04123b0ba231d61aeb 100644 (file)
@@ -140,6 +140,9 @@ int deny_severity;
 #define REEXEC_CONFIG_PASS_FD          (STDERR_FILENO + 3)
 #define REEXEC_MIN_FREE_FD             (STDERR_FILENO + 4)
 
+int myflag = 0;
+
+
 extern char *__progname;
 
 /* Server configuration options. */
@@ -419,7 +422,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
                minor = PROTOCOL_MINOR_1;
        }
        snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor,
-           SSH_VERSION, newline);
+           SSH_RELEASE, newline);
        server_version_string = xstrdup(buf);
 
        /* Send our protocol version identification. */
@@ -470,6 +473,9 @@ sshd_exchange_identification(int sock_in, int sock_out)
        }
        debug("Client protocol version %d.%d; client software version %.100s",
            remote_major, remote_minor, remote_version);
+       logit("SSH: Server;Ltype: Version;Remote: %s-%d;Protocol: %d.%d;Client: %.100s",
+             get_remote_ipaddr(), get_remote_port(),
+           remote_major, remote_minor, remote_version);
 
        compat_datafellows(remote_version);
 
@@ -948,6 +954,8 @@ server_listen(void)
        int ret, listen_sock, on = 1;
        struct addrinfo *ai;
        char ntop[NI_MAXHOST], strport[NI_MAXSERV];
+       int socksize;
+       int socksizelen = sizeof(int);
 
        for (ai = options.listen_addrs; ai; ai = ai->ai_next) {
                if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
@@ -994,6 +1002,11 @@ server_listen(void)
 
                debug("Bind to port %s on %s.", strport, ntop);
 
+               getsockopt(listen_sock, SOL_SOCKET, SO_RCVBUF, 
+                                  &socksize, &socksizelen);
+               debug("Server TCP RWIN socket size: %d", socksize);
+               debug("HPN Buffer Size: %d", options.hpn_buffer_size);
+
                /* Bind the socket to the desired port. */
                if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) {
                        error("Bind to port %s on %s failed: %.200s.",
@@ -1787,6 +1800,9 @@ main(int ac, char **av)
                cleanup_exit(255);
        }
 
+       /* set the HPN options for the child */
+       channel_set_hpn(options.hpn_disabled, options.hpn_buffer_size);
+
        /*
         * We use get_canonical_hostname with usedns = 0 instead of
         * get_remote_ipaddr here so IP options will be checked.
@@ -2232,9 +2248,15 @@ do_ssh2_kex(void)
 {
        Kex *kex;
 
+       myflag++;
+       debug ("MYFLAG IS %d", myflag);
        if (options.ciphers != NULL) {
                myproposal[PROPOSAL_ENC_ALGS_CTOS] =
                myproposal[PROPOSAL_ENC_ALGS_STOC] = options.ciphers;
+       } else if (options.none_enabled == 1) {
+               debug ("WARNING: None cipher enabled");
+               myproposal[PROPOSAL_ENC_ALGS_CTOS] =
+               myproposal[PROPOSAL_ENC_ALGS_STOC] = KEX_ENCRYPT_INCLUDE_NONE;
        }
        myproposal[PROPOSAL_ENC_ALGS_CTOS] =
            compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_CTOS]);
This page took 0.050843 seconds and 4 git commands to generate.