diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index d7fe32c946c1..89e33a5d4d93 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2134,7 +2134,8 @@ static bool can_checksum_protocol(netdev_features_t features, __be16 protocol) | |||
2134 | static netdev_features_t harmonize_features(struct sk_buff *skb, | 2134 | static netdev_features_t harmonize_features(struct sk_buff *skb, |
2135 | __be16 protocol, netdev_features_t features) | 2135 | __be16 protocol, netdev_features_t features) |
2136 | { | 2136 | { |
2137 | if (!can_checksum_protocol(features, protocol)) { | 2137 | if (skb->ip_summed != CHECKSUM_NONE && |
2138 | !can_checksum_protocol(features, protocol)) { | ||
2138 | features &= ~NETIF_F_ALL_CSUM; | 2139 | features &= ~NETIF_F_ALL_CSUM; |
2139 | features &= ~NETIF_F_SG; | 2140 | features &= ~NETIF_F_SG; |
2140 | } else if (illegal_highdma(skb->dev, skb)) { | 2141 | } else if (illegal_highdma(skb->dev, skb)) { |
@@ -3322,7 +3323,7 @@ ncls: | |||
3322 | 3323 | ||
3323 | if (pt_prev) { | 3324 | if (pt_prev) { |
3324 | if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC))) | 3325 | if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC))) |
3325 | ret = -ENOMEM; | 3326 | goto drop; |
3326 | else | 3327 | else |
3327 | ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); | 3328 | ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev); |
3328 | } else { | 3329 | } else { |