Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jan 2011 19:07:16 +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: r217592 - head/sys/netinet
Message-ID:  <201101191907.p0JJ7GMp086060@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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?
  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) {
+					INP_RUNLOCK(inp);
+					continue;
+				}
 				bzero(&group, sizeof(struct sockaddr_in));
 				group.sin_len = sizeof(struct sockaddr_in);
 				group.sin_family = AF_INET;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101191907.p0JJ7GMp086060>