diff options
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r-- | net/ipv4/ipip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 7f80fb4b82d3..fe3e9f7f1f0b 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -220,17 +220,17 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
220 | if (unlikely(skb->protocol != htons(ETH_P_IP))) | 220 | if (unlikely(skb->protocol != htons(ETH_P_IP))) |
221 | goto tx_error; | 221 | goto tx_error; |
222 | 222 | ||
223 | if (likely(!skb->encapsulation)) { | 223 | skb = iptunnel_handle_offloads(skb, false, SKB_GSO_IPIP); |
224 | skb_reset_inner_headers(skb); | 224 | if (IS_ERR(skb)) |
225 | skb->encapsulation = 1; | 225 | goto out; |
226 | } | ||
227 | 226 | ||
228 | ip_tunnel_xmit(skb, dev, tiph, tiph->protocol); | 227 | ip_tunnel_xmit(skb, dev, tiph, tiph->protocol); |
229 | return NETDEV_TX_OK; | 228 | return NETDEV_TX_OK; |
230 | 229 | ||
231 | tx_error: | 230 | tx_error: |
232 | dev->stats.tx_errors++; | ||
233 | dev_kfree_skb(skb); | 231 | dev_kfree_skb(skb); |
232 | out: | ||
233 | dev->stats.tx_errors++; | ||
234 | return NETDEV_TX_OK; | 234 | return NETDEV_TX_OK; |
235 | } | 235 | } |
236 | 236 | ||
@@ -275,6 +275,7 @@ static const struct net_device_ops ipip_netdev_ops = { | |||
275 | #define IPIP_FEATURES (NETIF_F_SG | \ | 275 | #define IPIP_FEATURES (NETIF_F_SG | \ |
276 | NETIF_F_FRAGLIST | \ | 276 | NETIF_F_FRAGLIST | \ |
277 | NETIF_F_HIGHDMA | \ | 277 | NETIF_F_HIGHDMA | \ |
278 | NETIF_F_GSO_SOFTWARE | \ | ||
278 | NETIF_F_HW_CSUM) | 279 | NETIF_F_HW_CSUM) |
279 | 280 | ||
280 | static void ipip_tunnel_setup(struct net_device *dev) | 281 | static void ipip_tunnel_setup(struct net_device *dev) |