From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 18 01:56:43 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F5BA106564A; Tue, 18 Oct 2011 01:56:43 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EACE8FC08; Tue, 18 Oct 2011 01:56:43 +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 p9I1uhJn050892; Tue, 18 Oct 2011 01:56:43 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9I1uhYc050890; Tue, 18 Oct 2011 01:56:43 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110180156.p9I1uhYc050890@svn.freebsd.org> From: Qing Li Date: Tue, 18 Oct 2011 01:56:43 +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: r226485 - stable/8/sys/netinet6 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 01:56:43 -0000 Author: qingli Date: Tue Oct 18 01:56:43 2011 New Revision: 226485 URL: http://svn.freebsd.org/changeset/base/226485 Log: MFC 226453 The code change made in r226040 was incomplete and resulted in routes such as fe80::1%lo0 no being installed. This patch completes the original intended fix. Reviewed by: hrs, bz Modified: stable/8/sys/netinet6/in6.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Mon Oct 17 23:36:29 2011 (r226484) +++ stable/8/sys/netinet6/in6.c Tue Oct 18 01:56:43 2011 (r226485) @@ -1777,14 +1777,17 @@ in6_ifinit(struct ifnet *ifp, struct in6 if (error != 0) return (error); ia->ia_flags |= IFA_ROUTE; + /* + * Handle the case for ::1 . + */ + if (ifp->if_flags & IFF_LOOPBACK) + ia->ia_flags |= IFA_RTSELF; } /* * add a loopback route to self */ - if (!(ia->ia_flags & IFA_RTSELF) - && (V_nd6_useloopback - && !(ifp->if_flags & IFF_LOOPBACK))) { + if (!(ia->ia_flags & IFA_RTSELF) && V_nd6_useloopback) { error = ifa_add_loopback_route((struct ifaddr *)ia, (struct sockaddr *)&ia->ia_addr); if (error == 0)