diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-11-09 10:22:12 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-10 21:18:55 -0800 |
commit | 2feb75c74db778c244719a5736b2b1dde914bb0c (patch) | |
tree | e196bbdc43edcd1de275acf2b1a2ea898e19ac11 | |
parent | f6e896dc60c84b5c5fb800c8e714b14f6e43668d (diff) |
[PATCH] NET: Fix zero-size datagram reception
The recent rewrite of skb_copy_datagram_iovec broke the reception of
zero-size datagrams. This patch fixes it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | net/core/datagram.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c index 81987df536e..d219435d086 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset, { int i, err, fraglen, end = 0; struct sk_buff *next = skb_shinfo(skb)->frag_list; + + if (!len) + return 0; + next_skb: fraglen = skb_headlen(skb); i = -1; |