From 26c10af9e2e87e7892dce677f6b38511545a370b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 26 Apr 2005 16:03:55 +0000 Subject: fix dns resolution for DSL connections --- mdk-stage1/dns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/dns.c b/mdk-stage1/dns.c index 7a386fad1..1d7d2d6c8 100644 --- a/mdk-stage1/dns.c +++ b/mdk-stage1/dns.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "network.h" #include "log.h" @@ -41,7 +42,7 @@ int mygethostbyname(char * name, struct in_addr * addr) struct hostent * h; /* prevent from timeouts */ - if (dns_server.s_addr == 0) + if (_res.nscount == 0) return -1; h = gethostbyname(name); @@ -69,7 +70,7 @@ char * mygethostbyaddr(char * ipnum) struct hostent * host; /* prevent from timeouts */ - if (dns_server.s_addr == 0) + if (_res.nscount == 0) return NULL; if (!inet_aton(ipnum, &in)) -- cgit v1.2.1