Commit a68f9bc4 authored by venaas's avatar venaas Committed by venaas

fixed one possibly serious IPv6 related bug

git-svn-id: e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent 8c48ebc0
......@@ -254,7 +254,7 @@ struct server *find_server(char type, struct sockaddr *addr, struct server *serv
for (res = s->peer.addrinfo; res; res = res->ai_next)
if ((a4 && res->ai_family == AF_INET &&
!memcmp(a4, &((struct sockaddr_in *)res->ai_addr)->sin_addr, 4)) ||
(res->ai_family == AF_INET6 &&
(sa6 && res->ai_family == AF_INET6 &&
!memcmp(&sa6->sin6_addr, &((struct sockaddr_in6 *)res->ai_addr)->sin6_addr, 16)))
return s;
if (server)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment