From owner-svn-src-user@FreeBSD.ORG Mon Oct 28 04:41:49 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B807F8C6; Mon, 28 Oct 2013 04:41:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C54D20C4; Mon, 28 Oct 2013 04:41:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9S4fn0k088549; Mon, 28 Oct 2013 04:41:49 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9S4fnPo088548; Mon, 28 Oct 2013 04:41:49 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201310280441.r9S4fnPo088548@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 28 Oct 2013 04:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r257238 - user/ae/inet6/sys/netinet 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.14 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: Mon, 28 Oct 2013 04:41:49 -0000 Author: ae Date: Mon Oct 28 04:41:49 2013 New Revision: 257238 URL: http://svnweb.freebsd.org/changeset/base/257238 Log: Remove in6_setscope() and handmade in6_clearscope() calls. Modified: user/ae/inet6/sys/netinet/ip_carp.c Modified: user/ae/inet6/sys/netinet/ip_carp.c ============================================================================== --- user/ae/inet6/sys/netinet/ip_carp.c Mon Oct 28 04:03:17 2013 (r257237) +++ user/ae/inet6/sys/netinet/ip_carp.c Mon Oct 28 04:41:49 2013 (r257238) @@ -373,8 +373,6 @@ carp_hmac_prepare(struct carp_softc *sc) memset(&cur6, 0xff, sizeof(cur6)); CARP_FOREACH_IFA(sc, ifa) { in6 = ifatoia6(ifa)->ia_addr.sin6_addr; - if (IN6_IS_SCOPE_EMBED(&in6)) - in6.s6_addr16[1] = 0; if (ifa->ifa_addr->sa_family == AF_INET6 && memcmp(&in6, &last6, sizeof(in6)) > 0 && memcmp(&in6, &cur6, sizeof(in6)) < 0) { @@ -893,12 +891,6 @@ carp_send_ad_locked(struct carp_softc *s /* Set the multicast destination. */ ip6->ip6_dst.s6_addr16[0] = htons(0xff02); ip6->ip6_dst.s6_addr8[15] = 0x12; - if (in6_setscope(&ip6->ip6_dst, sc->sc_carpdev, NULL) != 0) { - m_freem(m); - CARP_DEBUG("%s: in6_setscope failed\n", __func__); - goto resched; - } - ch_ptr = (struct carp_header *)(&ip6[1]); bcopy(&ch, ch_ptr, sizeof(ch)); if (carp_prepare_ad(m, sc, ch_ptr)) @@ -1320,10 +1312,6 @@ carp_multicast_setup(struct carp_if *cif bzero(&in6, sizeof(in6)); in6.s6_addr16[0] = htons(0xff02); in6.s6_addr8[15] = 0x12; - if ((error = in6_setscope(&in6, ifp, NULL)) != 0) { - free(im6o->im6o_membership, M_CARP); - break; - } in6m = NULL; if ((error = in6_mc_join(ifp, &in6, NULL, &in6m, 0)) != 0) { free(im6o->im6o_membership, M_CARP); @@ -1339,11 +1327,6 @@ carp_multicast_setup(struct carp_if *cif in6.s6_addr32[2] = htonl(1); in6.s6_addr32[3] = 0; in6.s6_addr8[12] = 0xff; - if ((error = in6_setscope(&in6, ifp, NULL)) != 0) { - in6_mc_leave(im6o->im6o_membership[0], NULL); - free(im6o->im6o_membership, M_CARP); - break; - } in6m = NULL; if ((error = in6_mc_join(ifp, &in6, NULL, &in6m, 0)) != 0) { in6_mc_leave(im6o->im6o_membership[0], NULL);