[PATCH 5/6] dns: use global nameserver/domainname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 net/dns.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/dns.c b/net/dns.c
index 0d6c337..81fa2ae 100644
--- a/net/dns.c
+++ b/net/dns.c
@@ -77,7 +77,7 @@ static int dns_send(char *name)
 	header->nauth    = 0;
 	header->nother   = 0;
 
-	domain = getenv("domainname");
+	domain = net_get_domainname();
 
 	if (!strchr(name, '.') && domain && *domain)
 		fullname = asprintf(".%s.%s.", name, domain);
@@ -205,11 +205,11 @@ IPaddr_t resolv(char *host)
 
 	dns_state = STATE_INIT;
 
-	ip = getenv_ip_dns("nameserver", 0);
+	ip = net_get_nameserver();
 	if (!ip)
 		return 0;
 
-	debug("resolving host %s via nameserver %s\n", host, getenv("nameserver"));
+	debug("resolving host %s via nameserver %s\n", host, ip_to_string(ip));
 
 	dns_con = net_udp_new(ip, DNS_PORT, dns_handler, NULL);
 	if (IS_ERR(dns_con))
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux