diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/skbuff.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 4724bcf9b0ca..97c32c75e704 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3116,9 +3116,13 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb, int hsize; int size; - len = head_skb->len - offset; - if (len > mss) - len = mss; + if (unlikely(mss == GSO_BY_FRAGS)) { + len = list_skb->len; + } else { + len = head_skb->len - offset; + if (len > mss) + len = mss; + } hsize = skb_headlen(head_skb) - offset; if (hsize < 0) |