use getaddrinfo always. simplify a bit.