Author: ume
Date: Fri Dec 18 17:57:31 2015
New Revision: 292445
URL: https://svnweb.freebsd.org/changeset/base/292445

Log:
  Use _map_v4v6_address().
  
  Suggested by: hrs
  MFC after:    1 week

Modified:
  head/lib/libc/net/getaddrinfo.c

Modified: head/lib/libc/net/getaddrinfo.c
==============================================================================
--- head/lib/libc/net/getaddrinfo.c     Fri Dec 18 17:53:18 2015        
(r292444)
+++ head/lib/libc/net/getaddrinfo.c     Fri Dec 18 17:57:31 2015        
(r292445)
@@ -797,10 +797,9 @@ match_addrselectpolicy(struct sockaddr *
                memset(&key, 0, sizeof(key));
                key.sin6_family = AF_INET6;
                key.sin6_len = sizeof(key);
-               key.sin6_addr.s6_addr[10] = 0xff;
-               key.sin6_addr.s6_addr[11] = 0xff;
-               memcpy(&key.sin6_addr.s6_addr[12],
-                      &((struct sockaddr_in *)addr)->sin_addr, 4);
+               _map_v4v6_address(
+                   (char *)&((struct sockaddr_in *)addr)->sin_addr,
+                   (char *)&key.sin6_addr);
                break;
        default:
                return(NULL);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to