diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-06 00:19:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-06 00:19:40 -0400 |
commit | ef28d1a20f9f18ebf1be15ef6f097a76f9a63499 (patch) | |
tree | 7d2f927dfcb09306912d81c50b8dc5eb0c02e21b /net/ipv6 | |
parent | 235b9f7ac53489011d32efeb89e12e308fdd2c64 (diff) |
MIB: add struct net to UDP6_INC_STATS_BH
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/udp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 833f715e4bff..d1477b350f76 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -299,7 +299,8 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) | |||
299 | if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) { | 299 | if ((rc = sock_queue_rcv_skb(sk,skb)) < 0) { |
300 | /* Note that an ENOMEM error is charged twice */ | 300 | /* Note that an ENOMEM error is charged twice */ |
301 | if (rc == -ENOMEM) { | 301 | if (rc == -ENOMEM) { |
302 | UDP6_INC_STATS_BH(UDP_MIB_RCVBUFERRORS, is_udplite); | 302 | UDP6_INC_STATS_BH(sock_net(sk), |
303 | UDP_MIB_RCVBUFERRORS, is_udplite); | ||
303 | atomic_inc(&sk->sk_drops); | 304 | atomic_inc(&sk->sk_drops); |
304 | } | 305 | } |
305 | goto drop; | 306 | goto drop; |
@@ -307,7 +308,7 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) | |||
307 | 308 | ||
308 | return 0; | 309 | return 0; |
309 | drop: | 310 | drop: |
310 | UDP6_INC_STATS_BH(UDP_MIB_INERRORS, is_udplite); | 311 | UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); |
311 | kfree_skb(skb); | 312 | kfree_skb(skb); |
312 | return -1; | 313 | return -1; |
313 | } | 314 | } |
@@ -439,7 +440,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
439 | struct net_device *dev = skb->dev; | 440 | struct net_device *dev = skb->dev; |
440 | struct in6_addr *saddr, *daddr; | 441 | struct in6_addr *saddr, *daddr; |
441 | u32 ulen = 0; | 442 | u32 ulen = 0; |
442 | struct net *net; | 443 | struct net *net = dev_net(skb->dev); |
443 | 444 | ||
444 | if (!pskb_may_pull(skb, sizeof(struct udphdr))) | 445 | if (!pskb_may_pull(skb, sizeof(struct udphdr))) |
445 | goto short_packet; | 446 | goto short_packet; |
@@ -474,7 +475,6 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
474 | if (udp6_csum_init(skb, uh, proto)) | 475 | if (udp6_csum_init(skb, uh, proto)) |
475 | goto discard; | 476 | goto discard; |
476 | 477 | ||
477 | net = dev_net(skb->dev); | ||
478 | /* | 478 | /* |
479 | * Multicast receive code | 479 | * Multicast receive code |
480 | */ | 480 | */ |
@@ -497,7 +497,8 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[], | |||
497 | 497 | ||
498 | if (udp_lib_checksum_complete(skb)) | 498 | if (udp_lib_checksum_complete(skb)) |
499 | goto discard; | 499 | goto discard; |
500 | UDP6_INC_STATS_BH(UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE); | 500 | UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, |
501 | proto == IPPROTO_UDPLITE); | ||
501 | 502 | ||
502 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev); | 503 | icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev); |
503 | 504 | ||
@@ -522,7 +523,7 @@ short_packet: | |||
522 | ulen, skb->len); | 523 | ulen, skb->len); |
523 | 524 | ||
524 | discard: | 525 | discard: |
525 | UDP6_INC_STATS_BH(UDP_MIB_INERRORS, proto == IPPROTO_UDPLITE); | 526 | UDP6_INC_STATS_BH(net, UDP_MIB_INERRORS, proto == IPPROTO_UDPLITE); |
526 | kfree_skb(skb); | 527 | kfree_skb(skb); |
527 | return 0; | 528 | return 0; |
528 | } | 529 | } |