From owner-svn-src-head@FreeBSD.ORG Thu Nov 11 05:40:39 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8169F106566C; Thu, 11 Nov 2010 05:40:39 +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 705A68FC0A; Thu, 11 Nov 2010 05:40:39 +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 oAB5ed2Z049347; Thu, 11 Nov 2010 05:40:39 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oAB5edwR049345; Thu, 11 Nov 2010 05:40:39 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201011110540.oAB5edwR049345@svn.freebsd.org> From: Randall Stewart Date: Thu, 11 Nov 2010 05:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r215110 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2010 05:40:39 -0000 Author: rrs Date: Thu Nov 11 05:40:39 2010 New Revision: 215110 URL: http://svn.freebsd.org/changeset/base/215110 Log: 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 ;-) Reviewed by: bz MFC after: 1 week Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Nov 11 05:38:32 2010 (r215109) +++ head/sys/netinet/in_pcb.c Thu Nov 11 05:40:39 2010 (r215110) @@ -874,10 +874,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 @@ -902,9 +898,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) {