From owner-svn-src-all@FreeBSD.ORG Tue Feb 9 19:27:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FD6A106568D; Tue, 9 Feb 2010 19:27:54 +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 4EE6F8FC2B; Tue, 9 Feb 2010 19:27:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o19JRsqR059667; Tue, 9 Feb 2010 19:27:54 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o19JRsQY059665; Tue, 9 Feb 2010 19:27:54 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201002091927.o19JRsQY059665@svn.freebsd.org> From: Qing Li Date: Tue, 9 Feb 2010 19:27:54 +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: r203718 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 09 Feb 2010 19:27:54 -0000 Author: qingli Date: Tue Feb 9 19:27:54 2010 New Revision: 203718 URL: http://svn.freebsd.org/changeset/base/203718 Log: MFC r203401 Some of the existing ppp and vpn related scripts create and set the IP addresses of the tunnel end points to the same value. In these cases the loopback route is not installed for the local end. Modified: stable/8/sys/netinet/in.c Directory Properties: stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Tue Feb 9 19:13:45 2010 (r203717) +++ stable/8/sys/netinet/in.c Tue Feb 9 19:27:54 2010 (r203718) @@ -921,6 +921,12 @@ in_ifinit(struct ifnet *ifp, struct in_i if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY) return (0); + if (ifp->if_flags & IFF_POINTOPOINT) { + if (ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr) + return (0); + } + + /* * add a loopback route to self */