[NETNS][IPV6]: Make ip6_frags per namespace.
The ip6_frags is moved to the network namespace structure. Because there can be multiple instances of the network namespaces, and the ip6_frags is no longer a global static variable, a helper function has been added to facilitate the initialization of the variables. Until the ipv6 protocol is not per namespace, the variables are accessed relatively from the initial network namespace. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
99bc9c4e45
commit
e71e0349eb
@@ -72,6 +72,8 @@ MODULE_LICENSE("GPL");
|
||||
static struct list_head inetsw6[SOCK_MAX];
|
||||
static DEFINE_SPINLOCK(inetsw6_lock);
|
||||
|
||||
void ipv6_frag_sysctl_init(struct net *net);
|
||||
|
||||
static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk)
|
||||
{
|
||||
const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo);
|
||||
@@ -720,6 +722,12 @@ static void cleanup_ipv6_mibs(void)
|
||||
static int inet6_net_init(struct net *net)
|
||||
{
|
||||
net->ipv6.sysctl.bindv6only = 0;
|
||||
net->ipv6.sysctl.frags.high_thresh = 256 * 1024;
|
||||
net->ipv6.sysctl.frags.low_thresh = 192 * 1024;
|
||||
net->ipv6.sysctl.frags.timeout = IPV6_FRAG_TIMEOUT;
|
||||
net->ipv6.sysctl.frags.secret_interval = 10 * 60 * HZ;
|
||||
ipv6_frag_sysctl_init(net);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user