Merge pull request #1804 from hardening/bypassLocalFix

Honor bypass local gateway setting
This commit is contained in:
Marc-André Moreau 2014-04-20 23:25:18 -04:00
commit f5c64ff3d0

View File

@ -214,12 +214,14 @@ BOOL nego_tcp_connect(rdpNego* nego)
{
if (!nego->tcp_connected)
{
if (nego->GatewayEnabled && nego->GatewayBypassLocal)
if (nego->GatewayEnabled)
{
/* Attempt a direct connection first, and then fallback to using the gateway */
transport_set_gateway_enabled(nego->transport, FALSE);
nego->tcp_connected = transport_connect(nego->transport, nego->hostname, nego->port);
if (nego->GatewayBypassLocal)
{
/* Attempt a direct connection first, and then fallback to using the gateway */
transport_set_gateway_enabled(nego->transport, FALSE);
nego->tcp_connected = transport_connect(nego->transport, nego->hostname, nego->port);
}
if (!nego->tcp_connected)
{