diff options
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index e62510d5ea5a..44e2a3d2359a 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -602,7 +602,7 @@ static int ipgre_rcv(struct sk_buff *skb) | |||
602 | #ifdef CONFIG_NET_IPGRE_BROADCAST | 602 | #ifdef CONFIG_NET_IPGRE_BROADCAST |
603 | if (ipv4_is_multicast(iph->daddr)) { | 603 | if (ipv4_is_multicast(iph->daddr)) { |
604 | /* Looped back packet, drop it! */ | 604 | /* Looped back packet, drop it! */ |
605 | if (skb->rtable->fl.iif == 0) | 605 | if (skb_rtable(skb)->fl.iif == 0) |
606 | goto drop; | 606 | goto drop; |
607 | stats->multicast++; | 607 | stats->multicast++; |
608 | skb->pkt_type = PACKET_BROADCAST; | 608 | skb->pkt_type = PACKET_BROADCAST; |
@@ -643,8 +643,7 @@ static int ipgre_rcv(struct sk_buff *skb) | |||
643 | stats->rx_packets++; | 643 | stats->rx_packets++; |
644 | stats->rx_bytes += len; | 644 | stats->rx_bytes += len; |
645 | skb->dev = tunnel->dev; | 645 | skb->dev = tunnel->dev; |
646 | dst_release(skb->dst); | 646 | skb_dst_drop(skb); |
647 | skb->dst = NULL; | ||
648 | nf_reset(skb); | 647 | nf_reset(skb); |
649 | 648 | ||
650 | skb_reset_network_header(skb); | 649 | skb_reset_network_header(skb); |
@@ -698,13 +697,13 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
698 | if ((dst = tiph->daddr) == 0) { | 697 | if ((dst = tiph->daddr) == 0) { |
699 | /* NBMA tunnel */ | 698 | /* NBMA tunnel */ |
700 | 699 | ||
701 | if (skb->dst == NULL) { | 700 | if (skb_dst(skb) == NULL) { |
702 | stats->tx_fifo_errors++; | 701 | stats->tx_fifo_errors++; |
703 | goto tx_error; | 702 | goto tx_error; |
704 | } | 703 | } |
705 | 704 | ||
706 | if (skb->protocol == htons(ETH_P_IP)) { | 705 | if (skb->protocol == htons(ETH_P_IP)) { |
707 | rt = skb->rtable; | 706 | rt = skb_rtable(skb); |
708 | if ((dst = rt->rt_gateway) == 0) | 707 | if ((dst = rt->rt_gateway) == 0) |
709 | goto tx_error_icmp; | 708 | goto tx_error_icmp; |
710 | } | 709 | } |
@@ -712,7 +711,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
712 | else if (skb->protocol == htons(ETH_P_IPV6)) { | 711 | else if (skb->protocol == htons(ETH_P_IPV6)) { |
713 | struct in6_addr *addr6; | 712 | struct in6_addr *addr6; |
714 | int addr_type; | 713 | int addr_type; |
715 | struct neighbour *neigh = skb->dst->neighbour; | 714 | struct neighbour *neigh = skb_dst(skb)->neighbour; |
716 | 715 | ||
717 | if (neigh == NULL) | 716 | if (neigh == NULL) |
718 | goto tx_error; | 717 | goto tx_error; |
@@ -766,10 +765,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
766 | if (df) | 765 | if (df) |
767 | mtu = dst_mtu(&rt->u.dst) - dev->hard_header_len - tunnel->hlen; | 766 | mtu = dst_mtu(&rt->u.dst) - dev->hard_header_len - tunnel->hlen; |
768 | else | 767 | else |
769 | mtu = skb->dst ? dst_mtu(skb->dst) : dev->mtu; | 768 | mtu = skb_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu; |
770 | 769 | ||
771 | if (skb->dst) | 770 | if (skb_dst(skb)) |
772 | skb->dst->ops->update_pmtu(skb->dst, mtu); | 771 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu); |
773 | 772 | ||
774 | if (skb->protocol == htons(ETH_P_IP)) { | 773 | if (skb->protocol == htons(ETH_P_IP)) { |
775 | df |= (old_iph->frag_off&htons(IP_DF)); | 774 | df |= (old_iph->frag_off&htons(IP_DF)); |
@@ -783,14 +782,14 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
783 | } | 782 | } |
784 | #ifdef CONFIG_IPV6 | 783 | #ifdef CONFIG_IPV6 |
785 | else if (skb->protocol == htons(ETH_P_IPV6)) { | 784 | else if (skb->protocol == htons(ETH_P_IPV6)) { |
786 | struct rt6_info *rt6 = (struct rt6_info *)skb->dst; | 785 | struct rt6_info *rt6 = (struct rt6_info *)skb_dst(skb); |
787 | 786 | ||
788 | if (rt6 && mtu < dst_mtu(skb->dst) && mtu >= IPV6_MIN_MTU) { | 787 | if (rt6 && mtu < dst_mtu(skb_dst(skb)) && mtu >= IPV6_MIN_MTU) { |
789 | if ((tunnel->parms.iph.daddr && | 788 | if ((tunnel->parms.iph.daddr && |
790 | !ipv4_is_multicast(tunnel->parms.iph.daddr)) || | 789 | !ipv4_is_multicast(tunnel->parms.iph.daddr)) || |
791 | rt6->rt6i_dst.plen == 128) { | 790 | rt6->rt6i_dst.plen == 128) { |
792 | rt6->rt6i_flags |= RTF_MODIFIED; | 791 | rt6->rt6i_flags |= RTF_MODIFIED; |
793 | skb->dst->metrics[RTAX_MTU-1] = mtu; | 792 | skb_dst(skb)->metrics[RTAX_MTU-1] = mtu; |
794 | } | 793 | } |
795 | } | 794 | } |
796 | 795 | ||
@@ -837,8 +836,8 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
837 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 836 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
838 | IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | | 837 | IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | |
839 | IPSKB_REROUTED); | 838 | IPSKB_REROUTED); |
840 | dst_release(skb->dst); | 839 | skb_dst_drop(skb); |
841 | skb->dst = &rt->u.dst; | 840 | skb_dst_set(skb, &rt->u.dst); |
842 | 841 | ||
843 | /* | 842 | /* |
844 | * Push down and install the IPIP header. | 843 | * Push down and install the IPIP header. |
@@ -1238,6 +1237,7 @@ static void ipgre_tunnel_setup(struct net_device *dev) | |||
1238 | dev->iflink = 0; | 1237 | dev->iflink = 0; |
1239 | dev->addr_len = 4; | 1238 | dev->addr_len = 4; |
1240 | dev->features |= NETIF_F_NETNS_LOCAL; | 1239 | dev->features |= NETIF_F_NETNS_LOCAL; |
1240 | dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; | ||
1241 | } | 1241 | } |
1242 | 1242 | ||
1243 | static int ipgre_tunnel_init(struct net_device *dev) | 1243 | static int ipgre_tunnel_init(struct net_device *dev) |