diff options
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index b3a59bd40f01..68e52308e552 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -575,8 +575,7 @@ static int ipip6_rcv(struct sk_buff *skb) | |||
575 | tunnel->dev->stats.rx_packets++; | 575 | tunnel->dev->stats.rx_packets++; |
576 | tunnel->dev->stats.rx_bytes += skb->len; | 576 | tunnel->dev->stats.rx_bytes += skb->len; |
577 | skb->dev = tunnel->dev; | 577 | skb->dev = tunnel->dev; |
578 | dst_release(skb->dst); | 578 | skb_dst_drop(skb); |
579 | skb->dst = NULL; | ||
580 | nf_reset(skb); | 579 | nf_reset(skb); |
581 | ipip6_ecn_decapsulate(iph, skb); | 580 | ipip6_ecn_decapsulate(iph, skb); |
582 | netif_rx(skb); | 581 | netif_rx(skb); |
@@ -638,8 +637,8 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
638 | if (dev->priv_flags & IFF_ISATAP) { | 637 | if (dev->priv_flags & IFF_ISATAP) { |
639 | struct neighbour *neigh = NULL; | 638 | struct neighbour *neigh = NULL; |
640 | 639 | ||
641 | if (skb->dst) | 640 | if (skb_dst(skb)) |
642 | neigh = skb->dst->neighbour; | 641 | neigh = skb_dst(skb)->neighbour; |
643 | 642 | ||
644 | if (neigh == NULL) { | 643 | if (neigh == NULL) { |
645 | if (net_ratelimit()) | 644 | if (net_ratelimit()) |
@@ -663,8 +662,8 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
663 | if (!dst) { | 662 | if (!dst) { |
664 | struct neighbour *neigh = NULL; | 663 | struct neighbour *neigh = NULL; |
665 | 664 | ||
666 | if (skb->dst) | 665 | if (skb_dst(skb)) |
667 | neigh = skb->dst->neighbour; | 666 | neigh = skb_dst(skb)->neighbour; |
668 | 667 | ||
669 | if (neigh == NULL) { | 668 | if (neigh == NULL) { |
670 | if (net_ratelimit()) | 669 | if (net_ratelimit()) |
@@ -714,7 +713,7 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
714 | if (tiph->frag_off) | 713 | if (tiph->frag_off) |
715 | mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); | 714 | mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr); |
716 | else | 715 | else |
717 | mtu = skb->dst ? dst_mtu(skb->dst) : dev->mtu; | 716 | mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu; |
718 | 717 | ||
719 | if (mtu < 68) { | 718 | if (mtu < 68) { |
720 | stats->collisions++; | 719 | stats->collisions++; |
@@ -723,8 +722,8 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
723 | } | 722 | } |
724 | if (mtu < IPV6_MIN_MTU) | 723 | if (mtu < IPV6_MIN_MTU) |
725 | mtu = IPV6_MIN_MTU; | 724 | mtu = IPV6_MIN_MTU; |
726 | if (tunnel->parms.iph.daddr && skb->dst) | 725 | if (tunnel->parms.iph.daddr && skb_dst(skb)) |
727 | skb->dst->ops->update_pmtu(skb->dst, mtu); | 726 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu); |
728 | 727 | ||
729 | if (skb->len > mtu) { | 728 | if (skb->len > mtu) { |
730 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev); | 729 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu, dev); |
@@ -768,8 +767,8 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
768 | skb_reset_network_header(skb); | 767 | skb_reset_network_header(skb); |
769 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 768 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
770 | IPCB(skb)->flags = 0; | 769 | IPCB(skb)->flags = 0; |
771 | dst_release(skb->dst); | 770 | skb_dst_drop(skb); |
772 | skb->dst = &rt->u.dst; | 771 | skb_dst_set(skb, &rt->u.dst); |
773 | 772 | ||
774 | /* | 773 | /* |
775 | * Push down and install the IPIP header. | 774 | * Push down and install the IPIP header. |