svn commit: r217592 - head/sys/netinet
Bjoern A. Zeeb
bz at FreeBSD.org
Wed Jan 19 20:55:07 UTC 2011
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
More information about the svn-src-all
mailing list