aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_fragment.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-01-22 06:06:23 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:10:35 -0800
commite5a2bb842cd9681d00d4ca963e63e4d3647e66f8 (patch)
treeb47692f3312039cb944f68f6fbeb0d10442f8056 /net/ipv4/ip_fragment.c
parent[NETNS][FRAGS]: Make the inet_frag_queue lookup work in namespaces. (diff)
downloadlinux-dev-e5a2bb842cd9681d00d4ca963e63e4d3647e66f8.tar.xz
linux-dev-e5a2bb842cd9681d00d4ca963e63e4d3647e66f8.zip
[NETNS][FRAGS]: Make the nqueues counter per-namespace.
This is simple - just move the variable from struct inet_frags to struct netns_frags and adjust the usage appropriately. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_fragment.c')
-rw-r--r--net/ipv4/ip_fragment.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 56211ef46eed..cd8c83025b48 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -95,9 +95,9 @@ static struct inet_frags_ctl ip4_frags_ctl __read_mostly = {
static struct inet_frags ip4_frags;
-int ip_frag_nqueues(void)
+int ip_frag_nqueues(struct net *net)
{
- return ip4_frags.nqueues;
+ return net->ipv4.frags.nqueues;
}
int ip_frag_mem(void)
@@ -675,6 +675,8 @@ static inline int ip4_frags_ctl_register(struct net *net)
static int ipv4_frags_init_net(struct net *net)
{
+ inet_frags_init_net(&net->ipv4.frags);
+
return ip4_frags_ctl_register(net);
}