Bug 920 - Enable client multiplexing to fall back to enhance transparency
Summary: Enable client multiplexing to fall back to enhance transparency
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: -current
Hardware: All OpenBSD
: P2 enhancement
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-26 04:53 AEST by Michael Knudsen
Modified: 2006-10-07 11:36 AEST (History)
0 users

See Also:


Attachments
Implementation of the suggested TcpFallback flag. It is a diff against the current in-tree OpenSSH as of August 25th. (4.27 KB, patch)
2004-08-26 04:55 AEST, Michael Knudsen
no flags Details | Diff
Add automatic multiplexing option (5.41 KB, patch)
2005-06-03 12:55 AEST, Damien Miller
no flags Details | Diff
Better manual diff (750 bytes, patch)
2005-06-06 21:55 AEST, Michael Knudsen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Knudsen 2004-08-26 04:53:17 AEST
In order to use SSH client session multiplexing, one must manually set up a
ControlMaster which is rather annoying.

I suggest adding a TcpFallback flag which allows the client to fall back to a
regular TCP connection in case the ControlPath control socket doesn't exist.
Furthermore I suggest adding a way to let a ControlMaster ignore an existing
ControlMaster socket by simply becoming a client of it.

These two options should make SSH client multiplexing completely transparently.
Comment 1 Michael Knudsen 2004-08-26 04:55:33 AEST
Created attachment 705 [details]
Implementation of the suggested TcpFallback flag. It is a diff against the current in-tree OpenSSH as of August 25th.

I sent this to djm@openbsd.org who suggested I added this as a bugreport here.
Comment 2 Ben Lindstrom 2004-08-26 12:33:11 AEST
+		/*
+	 	* If we return to here, socket could not be opened.
+	 	* Check for TCP fallback and abort if disabled.
+	 	*/
+
+		if (options.tcp_fallback == 0)
+			fatal("Couldn't connect to %s: %s",
+				options.control_path,
+				strerror(errno));

Not sure I like having the strerror(errno) so far away from the origination point.  Rather
see it inside the control_client();

Either return the error message as part of the char* or  let the function call run 'error()' then fall out of 
the function to let some higher logic decided if other action should be taken.

But I think if one askes to use a pipe and it doesn't exist.  It should whine a bit louder than this patch if 
not create the pipe for future connections to use.

Just something else to consider.

- Ben
Comment 3 Damien Miller 2005-06-03 12:55:29 AEST
Created attachment 926 [details]
Add automatic multiplexing option

OpenSSH -current includes some fallback support from ControlMaster=no -> TCP
connect. 

This patch adds the last piece: use an existing ControlMaster socket if one
exists, but fallback (and create one) if it doesn't.
Comment 4 Michael Knudsen 2005-06-06 21:55:58 AEST
Created attachment 928 [details]
Better manual diff

Fixes some stuff in the man part of djm@'s diff:

   1) New sentence, new line
   2) Use .Dq for double quotes instead of ""

I think .Dq should be replaced with .Pa whenever it is used for configuration
parameters, but that is an unrelated change so I've kept it out of this diff.
Comment 5 Michael Knudsen 2005-06-06 22:08:35 AEST
(In reply to comment #4)
> I think .Dq should be replaced with .Pa whenever it is used for configuration
> parameters, but that is an unrelated change so I've kept it out of this diff.

That should have said ``.Ar'', not ``.Pa''.
Comment 6 Damien Miller 2005-06-08 21:31:38 AEST
Applied to -current, will be in 4.2
Comment 7 Darren Tucker 2006-10-07 11:36:53 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.