summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-12-13 22:42:23 +0000
committerdjm <djm@openbsd.org>2015-12-13 22:42:23 +0000
commit83d10c81c063ad2cf05e7653d7663d02b3bd4d00 (patch)
treea1b6c024f317b1230a74033dd6ae4b7283e28b07
parentUse member names in cmd_entry definitions so I stop getting confused (diff)
downloadwireguard-openbsd-83d10c81c063ad2cf05e7653d7663d02b3bd4d00.tar.xz
wireguard-openbsd-83d10c81c063ad2cf05e7653d7663d02b3bd4d00.zip
unbreak connections with peers that set first_kex_follows;
fix from Matt Johnston va bz#2515
-rw-r--r--usr.bin/ssh/kex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c
index db74e2755fe..074bfc22842 100644
--- a/usr.bin/ssh/kex.c
+++ b/usr.bin/ssh/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.114 2015/12/10 17:08:40 mmcc Exp $ */
+/* $OpenBSD: kex.c,v 1.115 2015/12/13 22:42:23 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -264,11 +264,11 @@ kex_buf2prop(struct sshbuf *raw, int *first_kex_follows, char ***propp)
debug2("%s: %s", proposal_names[i], proposal[i]);
}
/* first kex follows / reserved */
- if ((r = sshbuf_get_u8(b, &v)) != 0 ||
- (r = sshbuf_get_u32(b, &i)) != 0)
+ if ((r = sshbuf_get_u8(b, &v)) != 0 || /* first_kex_follows */
+ (r = sshbuf_get_u32(b, &i)) != 0) /* reserved */
goto out;
if (first_kex_follows != NULL)
- *first_kex_follows = i;
+ *first_kex_follows = v;
debug2("first_kex_follows %d ", v);
debug2("reserved %u ", i);
r = 0;