为什么这样做?如果有IPv6条目,它将永远不会返回IPv4的任何东西!???DNS中的822到844行
以上来自于百度翻译
以下为原文
Why is this done this way? It will never return anything for ipv4 if there is an ipv6 entry!!?
Lines 822 to 844 in dns.c @ _DNS_IsNameResolved
if(nIPv6Entries || nIPv4Entries)
{
if(nIPv6Entries)
{
if(hostIPv6)
{
memcpy (hostIPv6->v, pDnsHE->pip6Address + nIPv6Entries - 1, sizeof (IPV6_ADDR));
}
if(singleAddress)
{ // retrieve only one address
nIPv4Entries = 0;
}
}
if(nIPv4Entries)
{
if(hostIPv4)
{ // get the 0th location of the address
hostIPv4->Val = (pDnsHE->pip4Address + 0)->Val;
}
}
return TCPIP_DNS_RES_OK;
}
为什么这样做?如果有IPv6条目,它将永远不会返回IPv4的任何东西!???DNS中的822到844行
以上来自于百度翻译
以下为原文
Why is this done this way? It will never return anything for ipv4 if there is an ipv6 entry!!?
Lines 822 to 844 in dns.c @ _DNS_IsNameResolved
if(nIPv6Entries || nIPv4Entries)
{
if(nIPv6Entries)
{
if(hostIPv6)
{
memcpy (hostIPv6->v, pDnsHE->pip6Address + nIPv6Entries - 1, sizeof (IPV6_ADDR));
}
if(singleAddress)
{ // retrieve only one address
nIPv4Entries = 0;
}
}
if(nIPv4Entries)
{
if(hostIPv4)
{ // get the 0th location of the address
hostIPv4->Val = (pDnsHE->pip4Address + 0)->Val;
}
}
return TCPIP_DNS_RES_OK;
}
举报