mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
Phonet: dropped datagrams accounting
The per-socket drop count is visible via /proc/net/phonet. Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2e2fb4b33d
commit
2eee40c7f7
1 changed files with 4 additions and 1 deletions
|
@ -159,8 +159,11 @@ out_nofree:
|
|||
static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
int err = sock_queue_rcv_skb(sk, skb);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
kfree_skb(skb);
|
||||
if (err == -ENOMEM)
|
||||
atomic_inc(&sk->sk_drops);
|
||||
}
|
||||
return err ? NET_RX_DROP : NET_RX_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue