Skip to content
  • Ed Swierk's avatar
    slirp: Remove our_addr code · ce0bd027
    Ed Swierk authored
    
    
    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: default avatarEd Swierk <eswierk@aristanetworks.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    ce0bd027