lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dnscore based resolving failure on windows
[lcore.git]
/
lcorelocalips.pas
diff --git
a/lcorelocalips.pas
b/lcorelocalips.pas
index ae2a00b03e8f5f2feb90672b084b07e24178fadd..dcc633a1a9a89ff8f2e6fedc38e5543bdae9f362 100644
(file)
--- a/
lcorelocalips.pas
+++ b/
lcorelocalips.pas
@@
-188,7
+188,7
@@
end;
{$else}
\r
\r
uses
\r
{$else}
\r
\r
uses
\r
- sysutils,windows,winsock,dnssync;
\r
+ sysutils,windows,winsock,dnssync
,dnscore
;
\r
\r
{the following code's purpose is to determine what IP windows would come from, to reach an IP
\r
it can be abused to find if there's any global v6 IPs on a local interface}
\r
\r
{the following code's purpose is to determine what IP windows would come from, to reach an IP
\r
it can be abused to find if there's any global v6 IPs on a local interface}
\r
@@
-255,8
+255,14
@@
function getlocalips:tbiniplist;
var
\r
a:integer;
\r
ip:tbinip;
\r
var
\r
a:integer;
\r
ip:tbinip;
\r
+ usewindnstemp:boolean;
\r
begin
\r
begin
\r
+ {this lookup must always be done with the windows API lookup
\r
+ setting usewindns to false on windows will fail with infinite recursion}
\r
+ usewindnstemp := usewindns;
\r
+ usewindns := true;
\r
result := forwardlookuplist('',0);
\r
result := forwardlookuplist('',0);
\r
+ usewindns := usewindnstemp;
\r
\r
{$ifdef ipv6}
\r
\r
\r
{$ifdef ipv6}
\r
\r