diff options
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/main.h | 1 | ||||
-rw-r--r-- | slirp/slirp.c | 17 |
2 files changed, 0 insertions, 18 deletions
diff --git a/slirp/main.h b/slirp/main.h index 28d92d8866..9f22fe1b0a 100644 --- a/slirp/main.h +++ b/slirp/main.h @@ -30,7 +30,6 @@ extern char *slirp_tty; extern char *exec_shell; extern u_int curtime; extern fd_set *global_readfds, *global_writefds, *global_xfds; -extern struct in_addr our_addr; extern struct in_addr loopback_addr; extern struct in_addr dns_addr; extern char *username; diff --git a/slirp/slirp.c b/slirp/slirp.c index 827dce71bb..da04ad19c8 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -27,8 +27,6 @@ #include "slirp.h" #include "hw/hw.h" -/* host address */ -struct in_addr our_addr; /* host dns address */ struct in_addr dns_addr; /* host loopback address */ @@ -117,8 +115,6 @@ static int get_dns_addr(struct in_addr *pdns_addr) if (sscanf(buff, "nameserver%*[ \t]%256s", buff2) == 1) { if (!inet_aton(buff2, &tmp_addr)) continue; - if (tmp_addr.s_addr == loopback_addr.s_addr) - tmp_addr = our_addr; /* If it's the first one, set it to dns_addr */ if (!found) *pdns_addr = tmp_addr; @@ -149,8 +145,6 @@ static int get_dns_addr(struct in_addr *pdns_addr) static void slirp_init_once(void) { static int initialized; - struct hostent *he; - char our_name[256]; #ifdef _WIN32 WSADATA Data; #endif @@ -168,17 +162,6 @@ static void slirp_init_once(void) loopback_addr.s_addr = htonl(INADDR_LOOPBACK); /* FIXME: This address may change during runtime */ - if (gethostname(our_name, sizeof(our_name)) == 0) { - he = gethostbyname(our_name); - if (he) { - our_addr = *(struct in_addr *)he->h_addr; - } - } - if (our_addr.s_addr == 0) { - our_addr = loopback_addr; - } - - /* FIXME: This address may change during runtime */ if (get_dns_addr(&dns_addr) < 0) { dns_addr = loopback_addr; } |