diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-05 04:51:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:32 -0500 |
commit | 27ab2568649d5ba6c5a20212079b7c4f6da4ca0d (patch) | |
tree | 19bb85e73d7deb0adf40386af3117c2f397b653d /include/linux/skbuff.h | |
parent | c8fecf2242a0ab7230210665986b8ef915e1ae9e (diff) |
[UDP]: Avoid repeated counting of checksum errors due to peeking
Currently it is possible for two processes to peek on the same socket
and end up incrementing the error counter twice for the same packet.
This patch fixes it by making skb_kill_datagram return whether it
succeeded in unlinking the packet and only incrementing the counter
if it did.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d39f53ef66bb..17b3f70fbbc3 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1549,7 +1549,7 @@ extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, | |||
1549 | int hlen, | 1549 | int hlen, |
1550 | struct iovec *iov); | 1550 | struct iovec *iov); |
1551 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); | 1551 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); |
1552 | extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb, | 1552 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, |
1553 | unsigned int flags); | 1553 | unsigned int flags); |
1554 | extern __wsum skb_checksum(const struct sk_buff *skb, int offset, | 1554 | extern __wsum skb_checksum(const struct sk_buff *skb, int offset, |
1555 | int len, __wsum csum); | 1555 | int len, __wsum csum); |