Date: Wed, 19 Jan 2011 20:50:25 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Randall Stewart <rrs@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217592 - head/sys/netinet Message-ID: <20110119204903.K3489@maildrop.int.zabbadoz.net> In-Reply-To: <201101191907.p0JJ7GMp086060@svn.freebsd.org> References: <201101191907.p0JJ7GMp086060@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Jan 2011, Randall Stewart wrote: > Author: rrs > Date: Wed Jan 19 19:07:16 2011 > New Revision: 217592 > URL: http://svn.freebsd.org/changeset/base/217592 > > Log: > Fix a bug where Multicast packets sent from a > udp endpoint may end up echoing back to the sender > even with OUT joining the multi-cast group. > > Reviewed by: gnn, bms, bz? Nah, I guess not; I wasn't Cc:ed on the remainder of the communication it seems. > Obtained from: deischen (with help from) > > Modified: > head/sys/netinet/udp_usrreq.c > > Modified: head/sys/netinet/udp_usrreq.c > ============================================================================== > --- head/sys/netinet/udp_usrreq.c Wed Jan 19 18:20:11 2011 (r217591) > +++ head/sys/netinet/udp_usrreq.c Wed Jan 19 19:07:16 2011 (r217592) > @@ -479,11 +479,13 @@ udp_input(struct mbuf *m, int off) > * and source-specific multicast. [RFC3678] > */ > imo = inp->inp_moptions; > - if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) && > - imo != NULL) { > + if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { > struct sockaddr_in group; > int blocked; > - > + if(imo == NULL) { ^^^^ usually I'd prefer a blank here. > + INP_RUNLOCK(inp); > + continue; > + } > bzero(&group, sizeof(struct sockaddr_in)); > group.sin_len = sizeof(struct sockaddr_in); > group.sin_family = AF_INET; > -- Bjoern A. Zeeb You have to have visions! <ks> Going to jail sucks -- <bz> All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110119204903.K3489>