diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/skbuff.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index d386f1082eb..f20e758fe46 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2212,10 +2212,10 @@ unsigned int skb_seq_read(unsigned int consumed, const u8 **data, | |||
2212 | return 0; | 2212 | return 0; |
2213 | 2213 | ||
2214 | next_skb: | 2214 | next_skb: |
2215 | block_limit = skb_headlen(st->cur_skb); | 2215 | block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; |
2216 | 2216 | ||
2217 | if (abs_offset < block_limit) { | 2217 | if (abs_offset < block_limit) { |
2218 | *data = st->cur_skb->data + abs_offset; | 2218 | *data = st->cur_skb->data + (abs_offset - st->stepped_offset); |
2219 | return block_limit - abs_offset; | 2219 | return block_limit - abs_offset; |
2220 | } | 2220 | } |
2221 | 2221 | ||
@@ -2250,13 +2250,14 @@ next_skb: | |||
2250 | st->frag_data = NULL; | 2250 | st->frag_data = NULL; |
2251 | } | 2251 | } |
2252 | 2252 | ||
2253 | if (st->cur_skb->next) { | 2253 | if (st->root_skb == st->cur_skb && |
2254 | st->cur_skb = st->cur_skb->next; | 2254 | skb_shinfo(st->root_skb)->frag_list) { |
2255 | st->cur_skb = skb_shinfo(st->root_skb)->frag_list; | ||
2255 | st->frag_idx = 0; | 2256 | st->frag_idx = 0; |
2256 | goto next_skb; | 2257 | goto next_skb; |
2257 | } else if (st->root_skb == st->cur_skb && | 2258 | } else if (st->cur_skb->next) { |
2258 | skb_shinfo(st->root_skb)->frag_list) { | 2259 | st->cur_skb = st->cur_skb->next; |
2259 | st->cur_skb = skb_shinfo(st->root_skb)->frag_list; | 2260 | st->frag_idx = 0; |
2260 | goto next_skb; | 2261 | goto next_skb; |
2261 | } | 2262 | } |
2262 | 2263 | ||