Message ID | 20220204201546.2703267-3-eric.dumazet@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f2f2325ec79970807012dfc9e716cdbb02d9b574 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ipv6: mc_forwarding changes | expand |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 541cd08871293eb5702e47e0645ea16394621e97..8e483e14b5709b1b8a6e9dfd6616a5bde5c273ee 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1575,6 +1575,9 @@ int ip6mr_sk_done(struct sock *sk) inet_sk(sk)->inet_num != IPPROTO_ICMPV6) return err; + if (!atomic_read(&net->ipv6.devconf_all->mc_forwarding)) + return err; + rtnl_lock(); ip6mr_for_each_table(mrt, net) { if (sk == rtnl_dereference(mrt->mroute_sk)) {