Honor bypass local gateway setting

This patch make the bypass local gateway setting works
This commit is contained in:
Hardening 2014-04-19 23:31:12 +02:00
parent 4da5cc9f9a
commit 4366a2219a
1 changed files with 7 additions and 5 deletions

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)
{