diff options
author | ume <ume@FreeBSD.org> | 2015-12-21 17:54:23 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2015-12-21 17:54:23 +0000 |
commit | 5e0b3f1167b3511ce001af9ce6d5ffec64fbef24 (patch) | |
tree | 3aead094c696669ff66c7001539b5d202c97633d /lib/libc | |
parent | 68574adad687ab8da29fb0e78bd309dfe0d6f788 (diff) | |
download | FreeBSD-src-5e0b3f1167b3511ce001af9ce6d5ffec64fbef24.zip FreeBSD-src-5e0b3f1167b3511ce001af9ce6d5ffec64fbef24.tar.gz |
Use _map_v4v6_address().
MFC after: 1 week
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/name6.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c index 89effe6..51e2da15 100644 --- a/lib/libc/net/name6.c +++ b/lib/libc/net/name6.c @@ -794,10 +794,9 @@ match_addrselectpolicy(struct sockaddr *addr, struct policyhead *head) 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); |