|
@@ -148,7 +148,6 @@ struct metadata_dst *iptunnel_metadata_reply(struct metadata_dst *md,
|
|
|
EXPORT_SYMBOL_GPL(iptunnel_metadata_reply);
|
|
|
|
|
|
struct sk_buff *iptunnel_handle_offloads(struct sk_buff *skb,
|
|
|
- bool csum_help,
|
|
|
int gso_type_mask)
|
|
|
{
|
|
|
int err;
|
|
@@ -166,18 +165,13 @@ struct sk_buff *iptunnel_handle_offloads(struct sk_buff *skb,
|
|
|
return skb;
|
|
|
}
|
|
|
|
|
|
- /* If packet is not gso and we are not offloading inner checksum,
|
|
|
- * clear encapsulation flag. This allows setting CHECKSUM_PARTIAL
|
|
|
- * on the outer header without confusing devices that implement
|
|
|
- * NETIF_F_IP_CSUM with encapsulation.
|
|
|
- */
|
|
|
- if (skb->ip_summed == CHECKSUM_PARTIAL && csum_help) {
|
|
|
- skb->encapsulation = 0;
|
|
|
- err = skb_checksum_help(skb);
|
|
|
- if (unlikely(err))
|
|
|
- goto error;
|
|
|
- } else if (skb->ip_summed != CHECKSUM_PARTIAL) {
|
|
|
+ if (skb->ip_summed != CHECKSUM_PARTIAL) {
|
|
|
skb->ip_summed = CHECKSUM_NONE;
|
|
|
+ /* We clear encapsulation here to prevent badly-written
|
|
|
+ * drivers potentially deciding to offload an inner checksum
|
|
|
+ * if we set CHECKSUM_PARTIAL on the outer header.
|
|
|
+ * This should go away when the drivers are all fixed.
|
|
|
+ */
|
|
|
skb->encapsulation = 0;
|
|
|
}
|
|
|
|