diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-11-02 02:55:00 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-11-02 19:25:04 -0500 |
commit | c75d721c761ad0f2d8725c40af9e4f376efefd24 (patch) | |
tree | ee282f7fd6e465d7b031d64b9ed7c03233ea94cf /net/core | |
parent | c2da8acaf488b8651edfb04ebf3ab089f3a7830f (diff) |
[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: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/core')
-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 81987df536eb..d219435d086c 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, | |||
213 | { | 213 | { |
214 | int i, err, fraglen, end = 0; | 214 | int i, err, fraglen, end = 0; |
215 | struct sk_buff *next = skb_shinfo(skb)->frag_list; | 215 | struct sk_buff *next = skb_shinfo(skb)->frag_list; |
216 | |||
217 | if (!len) | ||
218 | return 0; | ||
219 | |||
216 | next_skb: | 220 | next_skb: |
217 | fraglen = skb_headlen(skb); | 221 | fraglen = skb_headlen(skb); |
218 | i = -1; | 222 | i = -1; |