Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2015 17:54:23 +0000 (UTC)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292554 - head/lib/libc/net
Message-ID:  <201512211754.tBLHsNWj042718@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ume
Date: Mon Dec 21 17:54:23 2015
New Revision: 292554
URL: https://svnweb.freebsd.org/changeset/base/292554

Log:
  Use _map_v4v6_address().
  
  MFC after:	1 week

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

Modified: head/lib/libc/net/name6.c
==============================================================================
--- head/lib/libc/net/name6.c	Mon Dec 21 17:41:08 2015	(r292553)
+++ head/lib/libc/net/name6.c	Mon Dec 21 17:54:23 2015	(r292554)
@@ -794,10 +794,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512211754.tBLHsNWj042718>