summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2011-01-19 19:07:16 +0000
committerrrs <rrs@FreeBSD.org>2011-01-19 19:07:16 +0000
commit647f1a160ffbda332197f078042645ea4af181c2 (patch)
treee86d249b139eb9c508133c0cb95a38bf8dab18bc /sys/netinet/udp_usrreq.c
parent1c40bff239fb1e662e509cecf113c7516facb916 (diff)
downloadFreeBSD-src-647f1a160ffbda332197f078042645ea4af181c2.zip
FreeBSD-src-647f1a160ffbda332197f078042645ea4af181c2.tar.gz
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)
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 3bfe788..c9b4f3f 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -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;
OpenPOWER on IntegriCloud