From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 10:59:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F2F1A65; Mon, 10 Nov 2014 10:59:09 +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 6C10F12D; Mon, 10 Nov 2014 10:59:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAAAx9XK095253; Mon, 10 Nov 2014 10:59:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAAAx93m095252; Mon, 10 Nov 2014 10:59:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201411101059.sAAAx93m095252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 10 Nov 2014 10:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274342 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 10:59:09 -0000 Author: ae Date: Mon Nov 10 10:59:08 2014 New Revision: 274342 URL: https://svnweb.freebsd.org/changeset/base/274342 Log: For now handle only multicast addresses, we still use routes to LLA unicasts yet. Sponsored by: Yandex LLC Modified: head/sys/netinet6/in6_src.c Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Mon Nov 10 09:55:35 2014 (r274341) +++ head/sys/netinet6/in6_src.c Mon Nov 10 10:59:08 2014 (r274342) @@ -587,10 +587,18 @@ selectroute(struct sockaddr_in6 *dstsock goto getroute; } /* + * If the destination address is a multicast address and the outgoing + * interface for the address is specified by the caller, use it. + */ + if (IN6_IS_ADDR_MULTICAST(dst) && + mopts != NULL && (ifp = mopts->im6o_multicast_ifp) != NULL) { + goto done; /* we do not need a route for multicast. */ + } + /* * If destination address is LLA or link- or node-local multicast, * use it's embedded scope zone id to determine outgoing interface. */ - if (IN6_IS_SCOPE_LINKLOCAL(dst) || + if (IN6_IS_ADDR_MC_LINKLOCAL(dst) || IN6_IS_ADDR_MC_NODELOCAL(dst)) { zoneid = ntohs(in6_getscope(dst)); if (zoneid > 0) { @@ -598,14 +606,6 @@ selectroute(struct sockaddr_in6 *dstsock goto done; } } - /* - * If the destination address is a multicast address and the outgoing - * interface for the address is specified by the caller, use it. - */ - if (IN6_IS_ADDR_MULTICAST(dst) && - mopts != NULL && (ifp = mopts->im6o_multicast_ifp) != NULL) { - goto done; /* we do not need a route for multicast. */ - } getroute: /*