• Nils Goroll's avatar
    vtest: Untie vtest from 127.0.0.1 and support IPv6 only setups · 1c19f3fe
    Nils Goroll authored
    to support IPv6 only hosts, we try to resolve "localhost" if resolving
    "127.0.0.1" fails.
    
    Whatever address we determine is stored in the ${localhost}
    macro. Because of the different address:port vs. [address]:port
    formats for IPv4 vs. IPv6, we store "${localhost}:0" /
    "[${localhost}]:0" in the ${listen_addr} macro.
    
    Likewise we unify the *_sock macros to ${Xaddr}:${Xport} (the colon
    used to be missing) for IPv4 and [${Xaddr}]:${Xport} for IPv6.
    
    We also save ${listen_addr} in default_listen_addr for use from within
    the vtest code whenever we want to bind to or listen on an emphemeral
    port.
    
    Ref #3490
    1c19f3fe