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/route.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/route.c')
-rw-r--r-- | net/ipv6/route.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index e10a17015504..89dc69924340 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1833,16 +1833,19 @@ int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
1833 | static int ip6_pkt_drop(struct sk_buff *skb, int code, int ipstats_mib_noroutes) | 1833 | static int ip6_pkt_drop(struct sk_buff *skb, int code, int ipstats_mib_noroutes) |
1834 | { | 1834 | { |
1835 | int type; | 1835 | int type; |
1836 | struct dst_entry *dst = skb->dst; | ||
1836 | switch (ipstats_mib_noroutes) { | 1837 | switch (ipstats_mib_noroutes) { |
1837 | case IPSTATS_MIB_INNOROUTES: | 1838 | case IPSTATS_MIB_INNOROUTES: |
1838 | type = ipv6_addr_type(&ipv6_hdr(skb)->daddr); | 1839 | type = ipv6_addr_type(&ipv6_hdr(skb)->daddr); |
1839 | if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED) { | 1840 | if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED) { |
1840 | IP6_INC_STATS(ip6_dst_idev(skb->dst), IPSTATS_MIB_INADDRERRORS); | 1841 | IP6_INC_STATS(dev_net(dst->dev), ip6_dst_idev(dst), |
1842 | IPSTATS_MIB_INADDRERRORS); | ||
1841 | break; | 1843 | break; |
1842 | } | 1844 | } |
1843 | /* FALLTHROUGH */ | 1845 | /* FALLTHROUGH */ |
1844 | case IPSTATS_MIB_OUTNOROUTES: | 1846 | case IPSTATS_MIB_OUTNOROUTES: |
1845 | IP6_INC_STATS(ip6_dst_idev(skb->dst), ipstats_mib_noroutes); | 1847 | IP6_INC_STATS(dev_net(dst->dev), ip6_dst_idev(dst), |
1848 | ipstats_mib_noroutes); | ||
1846 | break; | 1849 | break; |
1847 | } | 1850 | } |
1848 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0, skb->dev); | 1851 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, code, 0, skb->dev); |