From: beware Date: Fri, 9 Dec 2011 23:15:45 +0000 (+0000) Subject: fix dnscore based resolving failure on windows X-Git-Url: http://www.lcore.org/git/lcore.git/commitdiff_plain/9653ddc572f5fd8ec065e4c357101ae6edae7959 fix dnscore based resolving failure on windows git-svn-id: file:///svnroot/lcore/trunk@108 b1de8a11-f9be-4011-bde0-cc7ace90066a --- diff --git a/lcorelocalips.pas b/lcorelocalips.pas index ae2a00b..dcc633a 100644 --- a/lcorelocalips.pas +++ b/lcorelocalips.pas @@ -188,7 +188,7 @@ end; {$else} uses - sysutils,windows,winsock,dnssync; + sysutils,windows,winsock,dnssync,dnscore; {the following code's purpose is to determine what IP windows would come from, to reach an IP it can be abused to find if there's any global v6 IPs on a local interface} @@ -255,8 +255,14 @@ function getlocalips:tbiniplist; var a:integer; ip:tbinip; + usewindnstemp:boolean; begin + {this lookup must always be done with the windows API lookup + setting usewindns to false on windows will fail with infinite recursion} + usewindnstemp := usewindns; + usewindns := true; result := forwardlookuplist('',0); + usewindns := usewindnstemp; {$ifdef ipv6}