From 8100d848d58aad72ccc481a35fe147da723351a6 Mon Sep 17 00:00:00 2001 From: "syeon.hwang" Date: Thu, 12 Jul 2012 20:28:09 +0900 Subject: [PATCH] [Title] Add DNS support for host has local DNS cache/DNS server [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- tizen/src/option.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tizen/src/option.c b/tizen/src/option.c index 44f6591..547cde9 100644 --- a/tizen/src/option.c +++ b/tizen/src/option.c @@ -129,6 +129,15 @@ int gethostDNS(char *dns1, char *dns2) } free(pAdapterAddr); #endif + + // by caramis... change DNS address if localhost has DNS server or DNS cache. + if(!strncmp(dns1, "127.0.0.1", 9) || !strncmp(dns1, "localhost", 9)) { + strncpy(dns1, "10.0.2.2", 9); + } + if(!strncmp(dns2, "127.0.0.1", 9) || !strncmp(dns2, "localhost", 9)) { + strncpy(dns2, "10.0.2.2", 9); + } + return 0; } -- 2.7.4