mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-04-29 02:25:45 -04:00
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.,
This commit is contained in:
2
socket.c
2
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) {
|
||||
|
||||
Reference in New Issue
Block a user