From owner-svn-src-all@FreeBSD.ORG Tue Sep 15 19:38:29 2009 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 D9711106568B; Tue, 15 Sep 2009 19:38:29 +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 C6C248FC22; Tue, 15 Sep 2009 19:38:29 +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 n8FJcTU8000833; Tue, 15 Sep 2009 19:38:29 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8FJcT93000831; Tue, 15 Sep 2009 19:38:29 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200909151938.n8FJcT93000831@svn.freebsd.org> From: Qing Li Date: Tue, 15 Sep 2009 19:38:29 +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: r197229 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 15 Sep 2009 19:38:30 -0000 Author: qingli Date: Tue Sep 15 19:38:29 2009 New Revision: 197229 URL: http://svn.freebsd.org/changeset/base/197229 Log: MFC r197203 Previously local end of point-to-point interface is not reachable within the system that owns the interface. Packets destined to the local end point leak to the wire towards the default gateway if one exists. This behavior is changed as part of the L2/L3 rewrite efforts. The local end point is now reachable within the system. The inpcb code needs to consider this fact during the address selection process. Reviewed by: bz Approved by: re Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/in_pcb.c Modified: stable/8/sys/netinet/in_pcb.c ============================================================================== --- stable/8/sys/netinet/in_pcb.c Tue Sep 15 19:24:18 2009 (r197228) +++ stable/8/sys/netinet/in_pcb.c Tue Sep 15 19:38:29 2009 (r197229) @@ -701,6 +701,8 @@ in_pcbladdr(struct inpcb *inp, struct in ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain))); if (ia == NULL) ia = ifatoia(ifa_ifwithnet(sintosa(&sain))); + if (ia == NULL) + ia = ifatoia(ifa_ifwithaddr(sintosa(&sain))); if (cred == NULL || !prison_flag(cred, PR_IP4)) { if (ia == NULL) {