diff options
author | Ed Swierk <eswierk@aristanetworks.com> | 2009-08-20 19:00:25 -0700 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 20:46:58 -0500 |
commit | 1c53d0d38dc187ba978f2748e8c4d7ab67bcc063 (patch) | |
tree | fbe016488bd5c6967887d749406c58103b218d71 /main.h | |
parent | a80ab8a3864e04a7544e4b4f2306d18245628e06 (diff) | |
download | slirp-1c53d0d38dc187ba978f2748e8c4d7ab67bcc063.zip slirp-1c53d0d38dc187ba978f2748e8c4d7ab67bcc063.tar.gz slirp-1c53d0d38dc187ba978f2748e8c4d7ab67bcc063.tar.bz2 |
slirp: Remove our_addr code
Three problems with our_addr:
- It's determined only once when qemu starts, but the address can change
(just like the DNS configuration can).
- It's supposed to be the IP address of a host network interface, but
there's no guarantee that gethostbyname(gethostname()) actually does
that: the host might be a laptop that has only a loopback interface up,
or the hostname might be localhost.localdomain, etc.
- It's useless at best: get_dns_addr() calls it, there's no reason to
send DNS requests to a different IP address if you're running a DNS
server on the host and resolv.conf points to 127.0.0.1.
These problems are easily solved by removing the code.
Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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; |