From owner-svn-src-user@FreeBSD.ORG Fri Apr 11 21:48:42 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 837C1CF; Fri, 11 Apr 2014 21:48:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 712661231; Fri, 11 Apr 2014 21:48:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3BLmg85064207; Fri, 11 Apr 2014 21:48:42 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3BLmgC8064206; Fri, 11 Apr 2014 21:48:42 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201404112148.s3BLmgC8064206@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Fri, 11 Apr 2014 21:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r264358 - user/ae/inet6/sys/netinet6 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 21:48:42 -0000 Author: ae Date: Fri Apr 11 21:48:41 2014 New Revision: 264358 URL: http://svnweb.freebsd.org/changeset/base/264358 Log: Application can use a global address belonging to the interface other than the outgoing. Found and tested by: bind9 Modified: user/ae/inet6/sys/netinet6/in6_src.c Modified: user/ae/inet6/sys/netinet6/in6_src.c ============================================================================== --- user/ae/inet6/sys/netinet6/in6_src.c Fri Apr 11 21:14:10 2014 (r264357) +++ user/ae/inet6/sys/netinet6/in6_src.c Fri Apr 11 21:48:41 2014 (r264358) @@ -411,9 +411,9 @@ check_addrs(const struct sockaddr_in6 *s struct in6_ifaddr *ia; /* - * Check that source address is available on the interface. + * Check that source address is available. */ - ia = in6ifa_ifpwithaddr(ifp, &src->sin6_addr); + ia = in6ifa_ifwithaddr(&src->sin6_addr, src->sin6_scope_id); if (ia == NULL || ( ia->ia6_flags & (IN6_IFF_ANYCAST | IN6_IFF_NOTREADY))) { if (ia != NULL)