}
else
{
- if (settings->RedirectionFlags & LB_TARGET_FQDN)
+ if (settings->RedirectionFlags & LB_TARGET_NET_ADDRESS)
{
free(settings->ServerHostname);
- settings->ServerHostname = _strdup(settings->RedirectionTargetFQDN);
+ settings->ServerHostname = _strdup(settings->TargetNetAddress);
if (!settings->ServerHostname)
return FALSE;
}
- else if (settings->RedirectionFlags & LB_TARGET_NET_ADDRESS)
+ else if (settings->RedirectionFlags & LB_TARGET_FQDN)
{
free(settings->ServerHostname);
- settings->ServerHostname = _strdup(settings->TargetNetAddress);
+ settings->ServerHostname = _strdup(settings->RedirectionTargetFQDN);
if (!settings->ServerHostname)
return FALSE;
if (!settings->RedirectionTargetFQDN)
return -1;
}
- else if (settings->RedirectionFlags & LB_TARGET_NET_ADDRESS)
+ if (settings->RedirectionFlags & LB_TARGET_NET_ADDRESS)
{
free(settings->TargetNetAddress);
settings->TargetNetAddress = _strdup(redirection->TargetNetAddress);
if (!settings->TargetNetAddress)
return -1;
}
- else if (settings->RedirectionFlags & LB_TARGET_NETBIOS_NAME)
+ if (settings->RedirectionFlags & LB_TARGET_NETBIOS_NAME)
{
free(settings->RedirectionTargetNetBiosName);
settings->RedirectionTargetNetBiosName = _strdup(redirection->TargetNetBiosName);