=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/kex.c,v retrieving revision 1.150 retrieving revision 1.151 diff -u -r1.150 -r1.151 --- src/usr.bin/ssh/kex.c 2019/01/21 12:08:13 1.150 +++ src/usr.bin/ssh/kex.c 2019/09/05 09:25:13 1.151 @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.150 2019/01/21 12:08:13 djm Exp $ */ +/* $OpenBSD: kex.c,v 1.151 2019/09/05 09:25:13 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -398,6 +398,7 @@ int r; char *algs; + debug("Sending SSH2_MSG_EXT_INFO"); if ((algs = sshkey_alg_list(0, 1, 1, ',')) == NULL) return SSH_ERR_ALLOC_FAIL; /* XXX filter algs list by allowed pubkey/hostbased types */ @@ -424,11 +425,11 @@ (r = sshpkt_send(ssh)) != 0) return r; debug("SSH2_MSG_NEWKEYS sent"); - debug("expecting SSH2_MSG_NEWKEYS"); ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_input_newkeys); - if (ssh->kex->ext_info_c) + if (ssh->kex->ext_info_c && (ssh->kex->flags & KEX_INITIAL) != 0) if ((r = kex_send_ext_info(ssh)) != 0) return r; + debug("expecting SSH2_MSG_NEWKEYS"); return 0; }