diff options
author | Nikolay Borisov <kernel@kyup.com> | 2016-02-08 23:29:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-11 09:59:22 -0500 |
commit | 166b6b2d6f01be67a83b87ab5c91350a68b17115 (patch) | |
tree | 99ebfba9cbc8a00fe0c5c24087f7a4e54c358f62 /net/ipv4/ip_sockglue.c | |
parent | 815c52700746cdcc0874a33390bac334a4b90107 (diff) | |
download | linux-stable-166b6b2d6f01be67a83b87ab5c91350a68b17115.tar.gz linux-stable-166b6b2d6f01be67a83b87ab5c91350a68b17115.tar.bz2 linux-stable-166b6b2d6f01be67a83b87ab5c91350a68b17115.zip |
igmp: Namespaceify igmp_max_msf sysctl knob
Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 5f73a7c03e27..92808f147ef5 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -571,6 +571,7 @@ static int do_ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen) { struct inet_sock *inet = inet_sk(sk); + struct net *net = sock_net(sk); int val = 0, err; bool needs_rtnl = setsockopt_needs_rtnl(optname); @@ -910,7 +911,7 @@ static int do_ip_setsockopt(struct sock *sk, int level, } /* numsrc >= (1G-4) overflow in 32 bits */ if (msf->imsf_numsrc >= 0x3ffffffcU || - msf->imsf_numsrc > sysctl_igmp_max_msf) { + msf->imsf_numsrc > net->ipv4.sysctl_igmp_max_msf) { kfree(msf); err = -ENOBUFS; break; @@ -1065,7 +1066,7 @@ static int do_ip_setsockopt(struct sock *sk, int level, /* numsrc >= (4G-140)/128 overflow in 32 bits */ if (gsf->gf_numsrc >= 0x1ffffff || - gsf->gf_numsrc > sysctl_igmp_max_msf) { + gsf->gf_numsrc > net->ipv4.sysctl_igmp_max_msf) { err = -ENOBUFS; goto mc_msf_out; } |