diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-01-10 05:56:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:18 -0500 |
commit | e71e0349eb32bc438fa80d8990c6f3592967d111 (patch) | |
tree | 1fc9565c1b8c36e5fe9ecfde20bd989f6475324f /net/ipv6/af_inet6.c | |
parent | 99bc9c4e45e7e783cf0b0a25cc03a103c038f254 (diff) |
[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>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 70662bf8ab98..c4a1882fa80f 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -72,6 +72,8 @@ MODULE_LICENSE("GPL"); | |||
72 | static struct list_head inetsw6[SOCK_MAX]; | 72 | static struct list_head inetsw6[SOCK_MAX]; |
73 | static DEFINE_SPINLOCK(inetsw6_lock); | 73 | static DEFINE_SPINLOCK(inetsw6_lock); |
74 | 74 | ||
75 | void ipv6_frag_sysctl_init(struct net *net); | ||
76 | |||
75 | static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk) | 77 | static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk) |
76 | { | 78 | { |
77 | const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo); | 79 | const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo); |
@@ -720,6 +722,12 @@ static void cleanup_ipv6_mibs(void) | |||
720 | static int inet6_net_init(struct net *net) | 722 | static int inet6_net_init(struct net *net) |
721 | { | 723 | { |
722 | net->ipv6.sysctl.bindv6only = 0; | 724 | net->ipv6.sysctl.bindv6only = 0; |
725 | net->ipv6.sysctl.frags.high_thresh = 256 * 1024; | ||
726 | net->ipv6.sysctl.frags.low_thresh = 192 * 1024; | ||
727 | net->ipv6.sysctl.frags.timeout = IPV6_FRAG_TIMEOUT; | ||
728 | net->ipv6.sysctl.frags.secret_interval = 10 * 60 * HZ; | ||
729 | ipv6_frag_sysctl_init(net); | ||
730 | |||
723 | return 0; | 731 | return 0; |
724 | } | 732 | } |
725 | 733 | ||