diff options
author | rea <rea@FreeBSD.org> | 2012-05-27 06:53:35 +0000 |
---|---|---|
committer | rea <rea@FreeBSD.org> | 2012-05-27 06:53:35 +0000 |
commit | 3f61b471d9eeab488bada65727c2a1f187d8b422 (patch) | |
tree | 44e7fea813e6ce2aabef10dcad6a1488eafdf842 /crypto/openssh/sshconnect.c | |
parent | 498f14d067796851619b9c7684cd8944a578b080 (diff) | |
download | FreeBSD-src-3f61b471d9eeab488bada65727c2a1f187d8b422.zip FreeBSD-src-3f61b471d9eeab488bada65727c2a1f187d8b422.tar.gz |
OpenSSH: allow VersionAddendum to be used again
Prior to this, setting VersionAddendum will be a no-op: one will
always have BASE_VERSION + " " + VERSION_HPN for VersionAddendum
set in the config and a bare BASE_VERSION + VERSION_HPN when there
is no VersionAddendum is set.
HPN patch requires both parties to have the "hpn" inside their
advertized versions, so we add VERSION_HPN to the VERSION_BASE
if HPN is enabled and omitting it if HPN is disabled.
VersionAddendum now uses the following logics:
* unset (default value): append " " and VERSION_ADDENDUM;
* VersionAddendum is set and isn't empty: append " "
and VersionAddendum;
* VersionAddendum is set and empty: don't append anything.
Approved by: des
Reviewed by: bz
MFC after: 3 days
Diffstat (limited to 'crypto/openssh/sshconnect.c')
-rw-r--r-- | crypto/openssh/sshconnect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c index 042f2a6..f073178 100644 --- a/crypto/openssh/sshconnect.c +++ b/crypto/openssh/sshconnect.c @@ -585,7 +585,7 @@ ssh_exchange_identification(int timeout_ms) snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, compat20 ? PROTOCOL_MINOR_2 : minor1, - SSH_RELEASE, compat20 ? "\r\n" : "\n"); + ssh_version_get(options.hpn_disabled), compat20 ? "\r\n" : "\n"); if (roaming_atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf)) fatal("write: %.100s", strerror(errno)); |