diff options
author | 2000-04-12 08:11:36 +0000 | |
---|---|---|
committer | 2000-04-12 08:11:36 +0000 | |
commit | 2fd6c0d119f2b2945a59e9d8e8397d1ee7fb4dcc (patch) | |
tree | 6b3b52fac9c3d28be02494f92007205085f65cd6 /usr.bin/ssh | |
parent | list 'i' only once (diff) | |
download | wireguard-openbsd-2fd6c0d119f2b2945a59e9d8e8397d1ee7fb4dcc.tar.xz wireguard-openbsd-2fd6c0d119f2b2945a59e9d8e8397d1ee7fb4dcc.zip |
print 1.99 only if server supports both
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sshd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 6c2258452d7..f0c504c5407 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.102 2000/04/12 07:45:44 markus Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.103 2000/04/12 08:11:36 markus Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -275,7 +275,8 @@ sshd_exchange_identification(int sock_in, int sock_out) char buf[256]; /* Must not be larger than remote_version. */ char remote_version[256]; /* Must be at least as big as buf. */ - if (options.protocol & (SSH_PROTO_1|SSH_PROTO_2)) { + if ((options.protocol & SSH_PROTO_1) && + (options.protocol & SSH_PROTO_2)) { major = PROTOCOL_MAJOR_1; minor = 99; } else if (options.protocol & SSH_PROTO_2) { |