aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/skbuff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index d429c41e0dc..c88426b5114 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2673,6 +2673,9 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
2673 if (skb_shinfo(p)->frag_list) 2673 if (skb_shinfo(p)->frag_list)
2674 goto merge; 2674 goto merge;
2675 else if (skb_headlen(skb) <= skb_gro_offset(skb)) { 2675 else if (skb_headlen(skb) <= skb_gro_offset(skb)) {
2676 skb_frag_t *frag;
2677 int i;
2678
2676 if (skb_shinfo(p)->nr_frags + skb_shinfo(skb)->nr_frags > 2679 if (skb_shinfo(p)->nr_frags + skb_shinfo(skb)->nr_frags >
2677 MAX_SKB_FRAGS) 2680 MAX_SKB_FRAGS)
2678 return -E2BIG; 2681 return -E2BIG;
@@ -2682,9 +2685,9 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
2682 skb_shinfo(skb)->frags[0].size -= 2685 skb_shinfo(skb)->frags[0].size -=
2683 skb_gro_offset(skb) - skb_headlen(skb); 2686 skb_gro_offset(skb) - skb_headlen(skb);
2684 2687
2685 memcpy(skb_shinfo(p)->frags + skb_shinfo(p)->nr_frags, 2688 frag = skb_shinfo(p)->frags + skb_shinfo(p)->nr_frags;
2686 skb_shinfo(skb)->frags, 2689 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
2687 skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t)); 2690 *frag++ = skb_shinfo(skb)->frags[i];
2688 2691
2689 skb_shinfo(p)->nr_frags += skb_shinfo(skb)->nr_frags; 2692 skb_shinfo(p)->nr_frags += skb_shinfo(skb)->nr_frags;
2690 skb_shinfo(skb)->nr_frags = 0; 2693 skb_shinfo(skb)->nr_frags = 0;