]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: fix ssh -O proxy w/mux which got broken by no longer
authormarkus@openbsd.org <markus@openbsd.org>
Wed, 24 Jun 2020 15:10:38 +0000 (15:10 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 26 Jun 2020 05:18:44 +0000 (15:18 +1000)
making ssh->kex optional in packet.c revision 1.278 ok djm@

OpenBSD-Commit-ID: 2b65df04a064c2c6277359921d2320c90ab7d917

packet.c

index e7abb3416060f0c7c4aed86f92494edb8f0052b8..4cce4133ae8c02b11b090a351ad833b50318d2e5 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.291 2020/03/06 18:20:44 markus Exp $ */
+/* $OpenBSD: packet.c,v 1.292 2020/06/24 15:10:38 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -282,7 +282,8 @@ ssh_packet_set_input_hook(struct ssh *ssh, ssh_packet_hook_fn *hook, void *ctx)
 int
 ssh_packet_is_rekeying(struct ssh *ssh)
 {
-       return ssh->state->rekeying || ssh->kex->done == 0;
+       return ssh->state->rekeying ||
+           (ssh->kex != NULL && ssh->kex->done == 0);
 }
 
 /*
@@ -345,6 +346,8 @@ ssh_packet_set_mux(struct ssh *ssh)
 {
        ssh->state->mux = 1;
        ssh->state->rekeying = 0;
+       kex_free(ssh->kex);
+       ssh->kex = NULL;
 }
 
 int