diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2009-02-02 16:41:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-02 16:41:57 -0500 |
commit | e408b8dcb5ce42243a902205005208e590f28454 (patch) | |
tree | eb1f29817e168be7b490d4b1be04170162cb440b /net/ipv4 | |
parent | 0afd4a21ba7d75e93fa79cf05d7a21774e149c0f (diff) |
udp: increments sk_drops in __udp_queue_rcv_skb()
Commit 93821778def10ec1e69aa3ac10adee975dad4ff3 (udp: Fix rcv socket
locking) accidentally removed sk_drops increments for UDP IPV4
sockets.
This field can be used to detect incorrect sizing of socket receive
buffers.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/udp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index b7faffe5c029..1ab180bad72a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1015,9 +1015,11 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
1015 | 1015 | ||
1016 | if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) { | 1016 | if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) { |
1017 | /* Note that an ENOMEM error is charged twice */ | 1017 | /* Note that an ENOMEM error is charged twice */ |
1018 | if (rc == -ENOMEM) | 1018 | if (rc == -ENOMEM) { |
1019 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, | 1019 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, |
1020 | is_udplite); | 1020 | is_udplite); |
1021 | atomic_inc(&sk->sk_drops); | ||
1022 | } | ||
1021 | goto drop; | 1023 | goto drop; |
1022 | } | 1024 | } |
1023 | 1025 | ||