View | Details | Raw Unified | Return to bug 920 | Differences between
and this patch

Collapse All | Expand All

(-)readconf.c (-1 / +9 lines)
Lines 106-112 Link Here
106
	oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
106
	oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
107
	oAddressFamily, oGssAuthentication, oGssDelegateCreds,
107
	oAddressFamily, oGssAuthentication, oGssDelegateCreds,
108
	oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
108
	oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
109
	oSendEnv, oControlPath, oControlMaster,
109
	oSendEnv, oControlPath, oControlMaster, oTCPFallback,
110
	oDeprecated, oUnsupported
110
	oDeprecated, oUnsupported
111
} OpCodes;
111
} OpCodes;
112
112
Lines 197-202 Link Here
197
	{ "sendenv", oSendEnv },
197
	{ "sendenv", oSendEnv },
198
	{ "controlpath", oControlPath },
198
	{ "controlpath", oControlPath },
199
	{ "controlmaster", oControlMaster },
199
	{ "controlmaster", oControlMaster },
200
	{ "tcpfallback", oTCPFallback },
200
	{ NULL, oBadOption }
201
	{ NULL, oBadOption }
201
};
202
};
202
203
Lines 772-777 Link Here
772
		intptr = &options->control_master;
773
		intptr = &options->control_master;
773
		goto parse_yesnoask;
774
		goto parse_yesnoask;
774
775
776
	case oTCPFallback:
777
		intptr = &options->tcp_fallback;
778
		goto parse_flag;
779
775
	case oDeprecated:
780
	case oDeprecated:
776
		debug("%s line %d: Deprecated option \"%s\"",
781
		debug("%s line %d: Deprecated option \"%s\"",
777
		    filename, linenum, keyword);
782
		    filename, linenum, keyword);
Lines 915-920 Link Here
915
	options->num_send_env = 0;
920
	options->num_send_env = 0;
916
	options->control_path = NULL;
921
	options->control_path = NULL;
917
	options->control_master = -1;
922
	options->control_master = -1;
923
	options->tcp_fallback = -1;
918
}
924
}
919
925
920
/*
926
/*
Lines 1037-1042 Link Here
1037
		options->server_alive_count_max = 3;
1043
		options->server_alive_count_max = 3;
1038
	if (options->control_master == -1)
1044
	if (options->control_master == -1)
1039
		options->control_master = 0;
1045
		options->control_master = 0;
1046
	if (options->tcp_fallback == -1)
1047
		options->tcp_fallback = 0;
1040
	/* options->proxy_command should not be set by default */
1048
	/* options->proxy_command should not be set by default */
1041
	/* options->user will be set in the main program if appropriate */
1049
	/* options->user will be set in the main program if appropriate */
1042
	/* options->hostname will be set in the main program if appropriate */
1050
	/* options->hostname will be set in the main program if appropriate */
(-)readconf.h (+1 lines)
Lines 111-116 Link Here
111
111
112
	char	*control_path;
112
	char	*control_path;
113
	int	control_master;
113
	int	control_master;
114
	int	tcp_fallback;
114
}       Options;
115
}       Options;
115
116
116
117
(-)ssh.c (-3 / +20 lines)
Lines 580-587 Link Here
580
		options.control_path = tilde_expand_filename(
580
		options.control_path = tilde_expand_filename(
581
		   options.control_path, original_real_uid);
581
		   options.control_path, original_real_uid);
582
	}
582
	}
583
	if (options.control_path != NULL && options.control_master == 0)
583
	if (options.control_path != NULL && options.control_master == 0) {
584
		control_client(options.control_path); /* This doesn't return */
584
		control_client(options.control_path);
585
586
		/*
587
	 	* If we return to here, socket could not be opened.
588
	 	* Check for TCP fallback and abort if disabled.
589
	 	*/
590
591
		if (options.tcp_fallback == 0)
592
			fatal("Couldn't connect to %s: %s",
593
				options.control_path,
594
				strerror(errno));
595
		else {
596
			debug("Couldn't connect to %s: %s.",
597
				options.control_path,
598
				strerror(errno));
599
			debug("Falling back to TCP.");
600
		}
601
	}
585
602
586
	/* Open a connection to the remote host. */
603
	/* Open a connection to the remote host. */
587
	if (ssh_connect(host, &hostaddr, options.port,
604
	if (ssh_connect(host, &hostaddr, options.port,
Lines 1255-1261 Link Here
1255
		fatal("%s socket(): %s", __func__, strerror(errno));
1272
		fatal("%s socket(): %s", __func__, strerror(errno));
1256
1273
1257
	if (connect(sock, (struct sockaddr*)&addr, addr.sun_len) == -1)
1274
	if (connect(sock, (struct sockaddr*)&addr, addr.sun_len) == -1)
1258
		fatal("Couldn't connect to %s: %s", path, strerror(errno));
1275
		return;
1259
1276
1260
	if ((cp = getenv("TERM")) == NULL)
1277
	if ((cp = getenv("TERM")) == NULL)
1261
		cp = "";
1278
		cp = "";
(-)ssh_config.5 (+16 lines)
Lines 270-275 Link Here
270
program before they are accepted (see
270
program before they are accepted (see
271
.Xr ssh-add 1
271
.Xr ssh-add 1
272
for details).
272
for details).
273
.Cm TCPFallback
274
(see below) can be used to fall back to regular TCP connections when
275
there is no 
276
.Cm ControlMaster
277
socket available.
273
.It Cm ControlPath
278
.It Cm ControlPath
274
Specify the path to the control socket used for connection sharing.
279
Specify the path to the control socket used for connection sharing.
275
See
280
See
Lines 712-717 Link Here
712
.Dq ask .
717
.Dq ask .
713
The default is
718
The default is
714
.Dq ask .
719
.Dq ask .
720
.It Cm TCPFallback
721
Specifies whether the client should fall back to using TCP if the
722
control socket specified by the
723
.Cm ControlPath
724
argument.
725
The argument must be either
726
.Dq yes ,
727
or
728
.Dq no ,
729
defaulting to
730
.Dq no .
715
.It Cm TCPKeepAlive
731
.It Cm TCPKeepAlive
716
Specifies whether the system should send TCP keepalive messages to the
732
Specifies whether the system should send TCP keepalive messages to the
717
other side.
733
other side.

Return to bug 920