diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index e61528c50209..727b6fda0e8c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2658,11 +2658,12 @@ static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path) | |||
2658 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | 2658 | struct sk_buff *__skb_gso_segment(struct sk_buff *skb, |
2659 | netdev_features_t features, bool tx_path) | 2659 | netdev_features_t features, bool tx_path) |
2660 | { | 2660 | { |
2661 | struct sk_buff *segs; | ||
2662 | |||
2661 | if (unlikely(skb_needs_check(skb, tx_path))) { | 2663 | if (unlikely(skb_needs_check(skb, tx_path))) { |
2662 | int err; | 2664 | int err; |
2663 | 2665 | ||
2664 | skb_warn_bad_offload(skb); | 2666 | /* We're going to init ->check field in TCP or UDP header */ |
2665 | |||
2666 | err = skb_cow_head(skb, 0); | 2667 | err = skb_cow_head(skb, 0); |
2667 | if (err < 0) | 2668 | if (err < 0) |
2668 | return ERR_PTR(err); | 2669 | return ERR_PTR(err); |
@@ -2690,7 +2691,12 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | |||
2690 | skb_reset_mac_header(skb); | 2691 | skb_reset_mac_header(skb); |
2691 | skb_reset_mac_len(skb); | 2692 | skb_reset_mac_len(skb); |
2692 | 2693 | ||
2693 | return skb_mac_gso_segment(skb, features); | 2694 | segs = skb_mac_gso_segment(skb, features); |
2695 | |||
2696 | if (unlikely(skb_needs_check(skb, tx_path))) | ||
2697 | skb_warn_bad_offload(skb); | ||
2698 | |||
2699 | return segs; | ||
2694 | } | 2700 | } |
2695 | EXPORT_SYMBOL(__skb_gso_segment); | 2701 | EXPORT_SYMBOL(__skb_gso_segment); |
2696 | 2702 | ||