Date: Thu, 11 Nov 2010 05:40:39 +0000 (UTC) From: Randall Stewart <rrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215110 - head/sys/netinet Message-ID: <201011110540.oAB5edwR049345@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011110540.oAB5edwR049345>