From owner-svn-src-stable@FreeBSD.ORG Sat Jan 14 19:22:46 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06DE4106566B; Sat, 14 Jan 2012 19:22:46 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA53F8FC16; Sat, 14 Jan 2012 19:22:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0EJMjB0045699; Sat, 14 Jan 2012 19:22:45 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0EJMjmF045696; Sat, 14 Jan 2012 19:22:45 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201201141922.q0EJMjmF045696@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 14 Jan 2012 19:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230112 - in stable/8: lib/libc/net sbin/route X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2012 19:22:46 -0000 Author: ume Date: Sat Jan 14 19:22:45 2012 New Revision: 230112 URL: http://svn.freebsd.org/changeset/base/230112 Log: MFC r229766: Handle the internal scope address representation of the KAME IPv6 stack for the node-local multicast address. Modified: stable/8/lib/libc/net/getaddrinfo.c stable/8/sbin/route/route.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/sbin/route/ (props changed) Modified: stable/8/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/8/lib/libc/net/getaddrinfo.c Sat Jan 14 19:08:39 2012 (r230111) +++ stable/8/lib/libc/net/getaddrinfo.c Sat Jan 14 19:22:45 2012 (r230112) @@ -1576,7 +1576,8 @@ ip6_str2scopeid(char *scope, struct sock if (*scope == '\0') return -1; - if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) { + if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) || + IN6_IS_ADDR_MC_NODELOCAL(a6)) { /* * We currently assume a one-to-one mapping between links * and interfaces, so we simply use interface indices for Modified: stable/8/sbin/route/route.c ============================================================================== --- stable/8/sbin/route/route.c Sat Jan 14 19:08:39 2012 (r230111) +++ stable/8/sbin/route/route.c Sat Jan 14 19:22:45 2012 (r230112) @@ -375,7 +375,8 @@ routename(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && + IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -500,7 +501,8 @@ netname(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && + IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -1002,7 +1004,8 @@ getaddr(int which, char *str, struct hos memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6)); #ifdef __KAME__ if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr)) && + IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&su->sin6.sin6_addr)) && su->sin6.sin6_scope_id) { *(u_int16_t *)&su->sin6.sin6_addr.s6_addr[2] = htons(su->sin6.sin6_scope_id);