From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 25 12:11:00 2010 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 37426106564A; Thu, 25 Nov 2010 12:11:00 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 251AA8FC1E; Thu, 25 Nov 2010 12:11:00 +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 oAPCB0Zq005043; Thu, 25 Nov 2010 12:11:00 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAPCB0Cu005041; Thu, 25 Nov 2010 12:11:00 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201011251211.oAPCB0Cu005041@svn.freebsd.org> From: Randall Stewart Date: Thu, 25 Nov 2010 12:11:00 +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: r215816 - stable/8/sys/netinet 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: Thu, 25 Nov 2010 12:11:00 -0000 Author: rrs Date: Thu Nov 25 12:10:59 2010 New Revision: 215816 URL: http://svn.freebsd.org/changeset/base/215816 Log: MFC of 215110: Fix so that a multicast packet can be sent even if there is no route out to that mcast address. The code in in_pcb inadvertantly would error (no route) even though the user may have specified the address with the proper socket option (to specify the egress interface). Thanks bz for reminding me I forgot to commit this ;-) Modified: stable/8/sys/netinet/in_pcb.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/netinet/in_pcb.c ============================================================================== --- stable/8/sys/netinet/in_pcb.c Thu Nov 25 08:55:57 2010 (r215815) +++ stable/8/sys/netinet/in_pcb.c Thu Nov 25 12:10:59 2010 (r215816) @@ -833,10 +833,6 @@ in_pcbconnect_setup(struct inpcb *inp, s } } if (laddr.s_addr == INADDR_ANY) { - error = in_pcbladdr(inp, &faddr, &laddr, cred); - if (error) - return (error); - /* * If the destination address is multicast and an outgoing * interface has been set as a multicast option, use the @@ -861,9 +857,12 @@ in_pcbconnect_setup(struct inpcb *inp, s laddr = ia->ia_addr.sin_addr; IN_IFADDR_RUNLOCK(); } + } else { + error = in_pcbladdr(inp, &faddr, &laddr, cred); + if (error) + return (error); } } - oinp = in_pcblookup_hash(inp->inp_pcbinfo, faddr, fport, laddr, lport, 0, NULL); if (oinp != NULL) {