diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-15 00:12:40 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-18 18:52:54 -0700 |
commit | 8edf19c2fe028563fc6ea9cb1995b8ee4172d4b6 (patch) | |
tree | 55c423bc7e13e99e816d95886f7d340dc1163ffa /net/ipv6/udp.c | |
parent | c720c7e8383aff1cb219bddf474ed89d850336e3 (diff) | |
download | linux-3.10-8edf19c2fe028563fc6ea9cb1995b8ee4172d4b6.tar.gz linux-3.10-8edf19c2fe028563fc6ea9cb1995b8ee4172d4b6.tar.bz2 linux-3.10-8edf19c2fe028563fc6ea9cb1995b8ee4172d4b6.zip |
net: sk_drops consolidation part 2
- skb_kill_datagram() can increment sk->sk_drops itself, not callers.
- UDP on IPV4 & IPV6 dropped frames (because of bad checksum or policy checks) increment sk_drops
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 829d300a6f3..d3b59d73f50 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -390,11 +390,13 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) if (rc == -ENOMEM) UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, is_udplite); - goto drop; + goto drop_no_sk_drops_inc; } return 0; drop: + atomic_inc(&sk->sk_drops); +drop_no_sk_drops_inc: UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); kfree_skb(skb); return -1; |