aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-14 20:12:40 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-18 21:52:54 -0400
commit8edf19c2fe028563fc6ea9cb1995b8ee4172d4b6 (patch)
tree55c423bc7e13e99e816d95886f7d340dc1163ffa /net/ipv6
parentc720c7e8383aff1cb219bddf474ed89d850336e3 (diff)
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')
-rw-r--r--net/ipv6/raw.c1
-rw-r--r--net/ipv6/udp.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 52ed7d7f9dab..cb834ab7f071 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -517,7 +517,6 @@ csum_copy_err:
517 as some normal condition. 517 as some normal condition.
518 */ 518 */
519 err = (flags&MSG_DONTWAIT) ? -EAGAIN : -EHOSTUNREACH; 519 err = (flags&MSG_DONTWAIT) ? -EAGAIN : -EHOSTUNREACH;
520 atomic_inc(&sk->sk_drops);
521 goto out; 520 goto out;
522} 521}
523 522
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 829d300a6f35..d3b59d73f507 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)
390 if (rc == -ENOMEM) 390 if (rc == -ENOMEM)
391 UDP6_INC_STATS_BH(sock_net(sk), 391 UDP6_INC_STATS_BH(sock_net(sk),
392 UDP_MIB_RCVBUFERRORS, is_udplite); 392 UDP_MIB_RCVBUFERRORS, is_udplite);
393 goto drop; 393 goto drop_no_sk_drops_inc;
394 } 394 }
395 395
396 return 0; 396 return 0;
397drop: 397drop:
398 atomic_inc(&sk->sk_drops);
399drop_no_sk_drops_inc:
398 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite); 400 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
399 kfree_skb(skb); 401 kfree_skb(skb);
400 return -1; 402 return -1;