From b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551 Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Fri, 7 Mar 2008 11:16:55 -0800 Subject: [NETNS][IPV6] mcast - handle several network namespace This patch make use of the network namespace information at the right places to handle the multicast for several network namespaces. It makes the socket control to be per namespace too. Signed-off-by: Daniel Lezcano Signed-off-by: Benjamin Thery Signed-off-by: David S. Miller --- net/ipv6/udp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/ipv6/udp.c') diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 53739de829d..d6e311f6c8e 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -323,6 +323,9 @@ static struct sock *udp_v6_mcast_next(struct sock *sk, sk_for_each_from(s, node) { struct inet_sock *inet = inet_sk(s); + if (s->sk_net != sk->sk_net) + continue; + if (s->sk_hash == num && s->sk_family == PF_INET6) { struct ipv6_pinfo *np = inet6_sk(s); if (inet->dport) { -- cgit v1.2.3