diff options
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r-- | net/ipv4/ipip.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 0c6e7bf18a43..93e2b787da20 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -370,8 +370,7 @@ static int ipip_rcv(struct sk_buff *skb) | |||
370 | tunnel->dev->stats.rx_packets++; | 370 | tunnel->dev->stats.rx_packets++; |
371 | tunnel->dev->stats.rx_bytes += skb->len; | 371 | tunnel->dev->stats.rx_bytes += skb->len; |
372 | skb->dev = tunnel->dev; | 372 | skb->dev = tunnel->dev; |
373 | dst_release(skb->dst); | 373 | skb_dst_drop(skb); |
374 | skb->dst = NULL; | ||
375 | nf_reset(skb); | 374 | nf_reset(skb); |
376 | ipip_ecn_decapsulate(iph, skb); | 375 | ipip_ecn_decapsulate(iph, skb); |
377 | netif_rx(skb); | 376 | netif_rx(skb); |
@@ -447,15 +446,15 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
447 | if (tiph->frag_off) | 446 | if (tiph->frag_off) |
448 | mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); | 447 | mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); |
449 | else | 448 | else |
450 | mtu = skb->dst ? dst_mtu(skb->dst) : dev->mtu; | 449 | mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu; |
451 | 450 | ||
452 | if (mtu < 68) { | 451 | if (mtu < 68) { |
453 | stats->collisions++; | 452 | stats->collisions++; |
454 | ip_rt_put(rt); | 453 | ip_rt_put(rt); |
455 | goto tx_error; | 454 | goto tx_error; |
456 | } | 455 | } |
457 | if (skb->dst) | 456 | if (skb_dst(skb)) |
458 | skb->dst->ops->update_pmtu(skb->dst, mtu); | 457 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu); |
459 | 458 | ||
460 | df |= (old_iph->frag_off&htons(IP_DF)); | 459 | df |= (old_iph->frag_off&htons(IP_DF)); |
461 | 460 | ||
@@ -502,8 +501,8 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
502 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 501 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
503 | IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | | 502 | IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | |
504 | IPSKB_REROUTED); | 503 | IPSKB_REROUTED); |
505 | dst_release(skb->dst); | 504 | skb_dst_drop(skb); |
506 | skb->dst = &rt->u.dst; | 505 | skb_dst_set(skb, &rt->u.dst); |
507 | 506 | ||
508 | /* | 507 | /* |
509 | * Push down and install the IPIP header. | 508 | * Push down and install the IPIP header. |