From owner-svn-src-stable@FreeBSD.ORG Thu Jun 14 21:40:15 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3346B1065672; Thu, 14 Jun 2012 21:40:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 142298FC0C; Thu, 14 Jun 2012 21:40:15 +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 q5ELeEJx022580; Thu, 14 Jun 2012 21:40:14 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5ELeE6l022578; Thu, 14 Jun 2012 21:40:14 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201206142140.q5ELeE6l022578@svn.freebsd.org> From: Andrew Thompson Date: Thu, 14 Jun 2012 21:40:14 +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: r237105 - stable/8/sys/netinet 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: Thu, 14 Jun 2012 21:40:15 -0000 Author: thompsa Date: Thu Jun 14 21:40:14 2012 New Revision: 237105 URL: http://svn.freebsd.org/changeset/base/237105 Log: Revert an inintended change in r237104 Modified: stable/8/sys/netinet/ip_carp.c Modified: stable/8/sys/netinet/ip_carp.c ============================================================================== --- stable/8/sys/netinet/ip_carp.c Thu Jun 14 21:36:16 2012 (r237104) +++ stable/8/sys/netinet/ip_carp.c Thu Jun 14 21:40:14 2012 (r237105) @@ -100,7 +100,6 @@ struct carp_softc { #ifdef INET6 struct in6_ifaddr *sc_ia6; /* primary iface address v6 */ struct ip6_moptions sc_im6o; - struct in6_ifaddr *sc_llia; #endif /* INET6 */ TAILQ_ENTRY(carp_softc) sc_list; @@ -1240,16 +1239,6 @@ carp_iamatch6(struct ifnet *ifp, struct cif = ifp->if_carp; CARP_LOCK(cif); TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) { - if (IN6_ARE_ADDR_EQUAL(taddr, - &vh->sc_llia->ia_addr.sin6_addr) && - (SC2IFP(vh)->if_flags & IFF_UP) && - (SC2IFP(vh)->if_drv_flags & IFF_DRV_RUNNING) && - vh->sc_state == MASTER) { - ifa = &vh->sc_llia->ia_addr; - ifa_ref(ifa); - CARP_UNLOCK(cif); - return (ifa); - } IF_ADDR_RLOCK(SC2IFP(vh)); TAILQ_FOREACH(ifa, &SC2IFP(vh)->if_addrlist, ifa_list) { if (IN6_ARE_ADDR_EQUAL(taddr, @@ -1281,28 +1270,6 @@ carp_macmatch6(struct ifnet *ifp, struct cif = ifp->if_carp; CARP_LOCK(cif); TAILQ_FOREACH(sc, &cif->vhif_vrs, sc_list) { - if (IN6_ARE_ADDR_EQUAL(taddr, - sc->sc_llia->ia_addr.sin6_addr) && - (SC2IFP(sc)->if_flags & IFF_UP) && - (SC2IFP(sc)->if_drv_flags & IFF_DRV_RUNNING) && - sc->sc_state == MASTER) { - struct ifnet *ifp = SC2IFP(sc); - mtag = m_tag_get(PACKET_TAG_CARP, - sizeof(struct ifnet *), M_NOWAIT); - if (mtag == NULL) { - /* better a bit than nothing */ - IF_ADDR_RUNLOCK(SC2IFP(sc)); - CARP_UNLOCK(cif); - return (IF_LLADDR(sc->sc_ifp)); - } - bcopy(&ifp, (caddr_t)(mtag + 1), - sizeof(struct ifnet *)); - m_tag_prepend(m, mtag); - - IF_ADDR_RUNLOCK(SC2IFP(sc)); - CARP_UNLOCK(cif); - return (IF_LLADDR(sc->sc_ifp)); - } IF_ADDR_RLOCK(SC2IFP(sc)); TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) { if (IN6_ARE_ADDR_EQUAL(taddr, @@ -1782,33 +1749,6 @@ carp_set_addr6(struct carp_softc *sc, st goto cleanup; im6o->im6o_membership[1] = in6m; im6o->im6o_num_memberships++; - - /* Add link local */ - bzero(&ifra, sizeof(ifra)); - ifra.ifra_addr.sin6_family = AF_INET6; - ifra.ifra_addr.sin6_len = sizeof(struct sockaddr_in6); - ifra.ifra_addr.sin6_addr.s6_addr32[0] = htonl(0xfe800000); - ifra.ifra_addr.sin6_addr.s6_addr32[1] = 0; - if ((error = in6_get_hw_ifid(sc->sc_ifp, NULL, &ifra.ifra_addr.sin6_addr)) != 0) - goto cleanup; - if ((error = in6_setscope(&ifra.ifra_addr.sin6_addr, ifp, NULL))) - goto cleanup; - ifra.ifra_prefixmask.sin6_len = sizeof(struct sockaddr_in6); - ifra.ifra_prefixmask.sin6_family = AF_INET6; - ifra.ifra_prefixmask.sin6_addr = in6mask64; - /* link-local addresses should NEVER expire. */ - ifra.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; - ifra.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; - - if ((error = in6_update_ifa(ifp, &ifra, NULL, - IN6_IFAUPDATE_DADDELAY)) != 0) - goto cleanup; - sc->sc_llia = in6ifa_ifpwithaddr(ifp, &ifra->ifra_addr.sin6_addr); - if (sc->sc_llia == NULL) { - error = ESRCH; - goto cleanup; - } - ifa_free(&sc->sc_llia->ia_ifa); } if (!ifp->if_carp) {