From: Martin Pool Date: Thu, 24 Jan 2002 08:52:28 +0000 (+0000) Subject: When doing a name->addr translation to check for spoofing, give the X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/bbc09ffba9ffc29381e72249df5375e60e9d5463 When doing a name->addr translation to check for spoofing, give the resolver the address family of the original address as a hint, so that we're more likely to find the correct A or AAAA record., --- diff --git a/socket.c b/socket.c index 76644ccd..efdeecf5 100644 --- a/socket.c +++ b/socket.c @@ -718,7 +718,7 @@ int check_name(int fd, memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; - hints.ai_flags = AI_CANONNAME; + hints.ai_flags = get_sockaddr_family(ss); hints.ai_socktype = SOCK_STREAM; error = getaddrinfo(name_buf, port_buf, &hints, &res0); if (error) {