summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--mux.c10
2 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index aac1b7193..05cbba64a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,18 @@
4 [mux.c] 4 [mux.c]
5 -Wuninitialized and remove a // comment; from portable 5 -Wuninitialized and remove a // comment; from portable
6 (Id sync only) 6 (Id sync only)
7 - djm@cvs.openbsd.org 2010/01/27 13:26:17
8 [mux.c]
9 fix bug introduced in mux rewrite:
10
11 In a mux master, when a socket to a mux slave closes before its server
12 session (as may occur when the slave has been signalled), gracefully
13 close the server session rather than deleting its channel immediately.
14 A server may have more messages on that channel to send (e.g. an exit
15 message) that will fatal() the client if they are sent to a channel that
16 has been prematurely deleted.
17
18 spotted by imorgan AT nas.nasa.gov
7 19
820100126 2020100126
9 - (djm) OpenBSD CVS Sync 21 - (djm) OpenBSD CVS Sync
diff --git a/mux.c b/mux.c
index ef99b5737..64781d44c 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.11 2010/01/26 02:15:20 djm Exp $ */ 1/* $OpenBSD: mux.c,v 1.12 2010/01/27 13:26:17 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -210,7 +210,13 @@ mux_master_control_cleanup_cb(int cid, void *unused)
210 __func__, c->self, c->remote_id); 210 __func__, c->self, c->remote_id);
211 c->remote_id = -1; 211 c->remote_id = -1;
212 sc->ctl_chan = -1; 212 sc->ctl_chan = -1;
213 chan_mark_dead(sc); 213 if (sc->type != SSH_CHANNEL_OPEN) {
214 debug2("%s: channel %d: not open", __func__, sc->self);
215 chan_mark_dead(c);
216 } else {
217 chan_read_failed(sc);
218 chan_write_failed(sc);
219 }
214 } 220 }
215 channel_cancel_cleanup(c->self); 221 channel_cancel_cleanup(c->self);
216} 222}