Skip to content

Commit

Permalink
[NET]: Fix zero-size datagram reception
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and Arnaldo Carvalho de Melo committed Nov 3, 2005
1 parent c2da8ac commit c75d721
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/core/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c75d721

Please sign in to comment.