diff options
author | Denis V. Lunev <den@openvz.org> | 2008-10-08 13:54:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 13:54:51 -0400 |
commit | 3bd653c8455bc7991bae77968702b31c8f5df883 (patch) | |
tree | f21c557e4b002ddf265ed111edd2c0bb97b01e38 /net/ipv6/reassembly.c | |
parent | 98b3377ca77a06a7bd75a444e9f7136e9bb5112e (diff) |
netns: add net parameter to IP6_INC_STATS
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r-- | net/ipv6/reassembly.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index f4f62f086096..63644075f2d6 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -433,7 +433,8 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb, | |||
433 | return -1; | 433 | return -1; |
434 | 434 | ||
435 | err: | 435 | err: |
436 | IP6_INC_STATS(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMFAILS); | 436 | IP6_INC_STATS(dev_net(skb->dst->dev), ip6_dst_idev(skb->dst), |
437 | IPSTATS_MIB_REASMFAILS); | ||
437 | kfree_skb(skb); | 438 | kfree_skb(skb); |
438 | return -1; | 439 | return -1; |
439 | } | 440 | } |
@@ -573,7 +574,7 @@ static int ipv6_frag_rcv(struct sk_buff *skb) | |||
573 | struct frag_hdr *fhdr; | 574 | struct frag_hdr *fhdr; |
574 | struct frag_queue *fq; | 575 | struct frag_queue *fq; |
575 | struct ipv6hdr *hdr = ipv6_hdr(skb); | 576 | struct ipv6hdr *hdr = ipv6_hdr(skb); |
576 | struct net *net; | 577 | struct net *net = dev_net(skb->dst->dev); |
577 | 578 | ||
578 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMREQDS); | 579 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMREQDS); |
579 | 580 | ||
@@ -597,7 +598,6 @@ static int ipv6_frag_rcv(struct sk_buff *skb) | |||
597 | return 1; | 598 | return 1; |
598 | } | 599 | } |
599 | 600 | ||
600 | net = dev_net(skb->dev); | ||
601 | if (atomic_read(&net->ipv6.frags.mem) > net->ipv6.frags.high_thresh) | 601 | if (atomic_read(&net->ipv6.frags.mem) > net->ipv6.frags.high_thresh) |
602 | ip6_evictor(net, ip6_dst_idev(skb->dst)); | 602 | ip6_evictor(net, ip6_dst_idev(skb->dst)); |
603 | 603 | ||
@@ -619,7 +619,7 @@ static int ipv6_frag_rcv(struct sk_buff *skb) | |||
619 | return -1; | 619 | return -1; |
620 | 620 | ||
621 | fail_hdr: | 621 | fail_hdr: |
622 | IP6_INC_STATS(ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS); | 622 | IP6_INC_STATS(net, ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS); |
623 | icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, skb_network_header_len(skb)); | 623 | icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, skb_network_header_len(skb)); |
624 | return -1; | 624 | return -1; |
625 | } | 625 | } |