Commit b8ad0cbc authored by Daniel Lezcano's avatar Daniel Lezcano Committed by David S. Miller

[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: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: default avatarBenjamin Thery <benjamin.thery@bull.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5047992
...@@ -53,5 +53,6 @@ struct netns_ipv6 { ...@@ -53,5 +53,6 @@ struct netns_ipv6 {
struct sock **icmp_sk; struct sock **icmp_sk;
struct sock *ndisc_sk; struct sock *ndisc_sk;
struct sock *tcp_sk; struct sock *tcp_sk;
struct sock *igmp_sk;
}; };
#endif #endif
This diff is collapsed.
...@@ -323,6 +323,9 @@ static struct sock *udp_v6_mcast_next(struct sock *sk, ...@@ -323,6 +323,9 @@ static struct sock *udp_v6_mcast_next(struct sock *sk,
sk_for_each_from(s, node) { sk_for_each_from(s, node) {
struct inet_sock *inet = inet_sk(s); 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) { if (s->sk_hash == num && s->sk_family == PF_INET6) {
struct ipv6_pinfo *np = inet6_sk(s); struct ipv6_pinfo *np = inet6_sk(s);
if (inet->dport) { if (inet->dport) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment