提交 c75d721c 编写于 作者: H Herbert Xu 提交者: Arnaldo Carvalho de Melo

[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: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
上级 c2da8aca
...@@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset, ...@@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset,
{ {
int i, err, fraglen, end = 0; int i, err, fraglen, end = 0;
struct sk_buff *next = skb_shinfo(skb)->frag_list; struct sk_buff *next = skb_shinfo(skb)->frag_list;
if (!len)
return 0;
next_skb: next_skb:
fraglen = skb_headlen(skb); fraglen = skb_headlen(skb);
i = -1; i = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册