mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
udp: increments sk_drops in __udp_queue_rcv_skb()
Commit 93821778de
(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>
This commit is contained in:
parent
0afd4a21ba
commit
e408b8dcb5
1 changed files with 3 additions and 1 deletions
|
@ -1015,9 +1015,11 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
|
|||
|
||||
if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) {
|
||||
/* Note that an ENOMEM error is charged twice */
|
||||
if (rc == -ENOMEM)
|
||||
if (rc == -ENOMEM) {
|
||||
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
|
||||
is_udplite);
|
||||
atomic_inc(&sk->sk_drops);
|
||||
}
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue