[PATCH] ipv6: fix socket multicast check

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE5285d

2 messages, 2 authors, 2012-03-05 · open the first message on its own page

[PATCH] ipv6: fix socket multicast check

From: Alexandru Juncu <hidden>
Date: 2012-03-05 18:13:04

This fixes an issue where multicast packets are delivered for
sockets which didn't join any multicast groups.

The issue was discovered because Hello packets duplicates were
received in OSPFv3.

Signed-off-by: Alexandru Juncu <redacted>
Cc: Daniel Baluta <redacted>
---
 net/ipv6/mcast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index b853f06..10cc72f 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -622,7 +622,7 @@ int inet6_mc_check(struct sock *sk, const struct in6_addr *mc_addr,
 	}
 	if (!mc) {
 		rcu_read_unlock();
-		return 1;
+		return 0;
 	}
 	read_lock(&mc->sflock);
 	psl = mc->sflist;
-- 
1.7.5.4

Re: [PATCH] ipv6: fix socket multicast check

From: David Stevens <hidden>
Date: 2012-03-05 18:47:22

A socket does not need to join a multicast group to receive multicast 
packets.
Group membership is per-interface. The mc lookup here is only to apply
source filters, if any, which are per-socket.

NAK.
                                                +-DLS

netdev-owner@vger.kernel.org wrote on 03/05/2012 10:12:09 AM:
quoted hunk
From: Alexandru Juncu <redacted>
To: netdev@vger.kernel.org, davem@davemloft.net, yoshfuji@linux-
ipv6.org, kuznet@ms2.inr.ac.ru, kaber@trash.net
Cc: alexj@rosedu.org, Alexandru Juncu <redacted>, Daniel 
Baluta [off-list ref]
Date: 03/05/2012 10:13 AM
Subject: [PATCH] ipv6: fix socket multicast check
Sent by: netdev-owner@vger.kernel.org

This fixes an issue where multicast packets are delivered for
sockets which didn't join any multicast groups.

The issue was discovered because Hello packets duplicates were
received in OSPFv3.

Signed-off-by: Alexandru Juncu <redacted>
Cc: Daniel Baluta <redacted>
---
 net/ipv6/mcast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index b853f06..10cc72f 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -622,7 +622,7 @@ int inet6_mc_check(struct sock *sk, const struct
in6_addr *mc_addr,
    }
    if (!mc) {
       rcu_read_unlock();
-      return 1;
+      return 0;
    }
    read_lock(&mc->sflock);
    psl = mc->sflist;
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help