diff options
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 7c6fda6fe846..851f46b910f2 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -533,7 +533,7 @@ static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) | |||
533 | { | 533 | { |
534 | if (INET_ECN_is_ce(iph->tos)) { | 534 | if (INET_ECN_is_ce(iph->tos)) { |
535 | if (skb->protocol == htons(ETH_P_IP)) { | 535 | if (skb->protocol == htons(ETH_P_IP)) { |
536 | IP_ECN_set_ce(skb->nh.iph); | 536 | IP_ECN_set_ce(ip_hdr(skb)); |
537 | } else if (skb->protocol == htons(ETH_P_IPV6)) { | 537 | } else if (skb->protocol == htons(ETH_P_IPV6)) { |
538 | IP6_ECN_set_ce(skb->nh.ipv6h); | 538 | IP6_ECN_set_ce(skb->nh.ipv6h); |
539 | } | 539 | } |
@@ -565,7 +565,7 @@ static int ipgre_rcv(struct sk_buff *skb) | |||
565 | if (!pskb_may_pull(skb, 16)) | 565 | if (!pskb_may_pull(skb, 16)) |
566 | goto drop_nolock; | 566 | goto drop_nolock; |
567 | 567 | ||
568 | iph = skb->nh.iph; | 568 | iph = ip_hdr(skb); |
569 | h = skb->data; | 569 | h = skb->data; |
570 | flags = *(__be16*)h; | 570 | flags = *(__be16*)h; |
571 | 571 | ||
@@ -670,7 +670,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
670 | { | 670 | { |
671 | struct ip_tunnel *tunnel = netdev_priv(dev); | 671 | struct ip_tunnel *tunnel = netdev_priv(dev); |
672 | struct net_device_stats *stats = &tunnel->stat; | 672 | struct net_device_stats *stats = &tunnel->stat; |
673 | struct iphdr *old_iph = skb->nh.iph; | 673 | struct iphdr *old_iph = ip_hdr(skb); |
674 | struct iphdr *tiph; | 674 | struct iphdr *tiph; |
675 | u8 tos; | 675 | u8 tos; |
676 | __be16 df; | 676 | __be16 df; |
@@ -825,7 +825,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
825 | skb_set_owner_w(new_skb, skb->sk); | 825 | skb_set_owner_w(new_skb, skb->sk); |
826 | dev_kfree_skb(skb); | 826 | dev_kfree_skb(skb); |
827 | skb = new_skb; | 827 | skb = new_skb; |
828 | old_iph = skb->nh.iph; | 828 | old_iph = ip_hdr(skb); |
829 | } | 829 | } |
830 | 830 | ||
831 | skb->h.raw = skb->nh.raw; | 831 | skb->h.raw = skb->nh.raw; |
@@ -841,7 +841,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
841 | * Push down and install the IPIP header. | 841 | * Push down and install the IPIP header. |
842 | */ | 842 | */ |
843 | 843 | ||
844 | iph = skb->nh.iph; | 844 | iph = ip_hdr(skb); |
845 | iph->version = 4; | 845 | iph->version = 4; |
846 | iph->ihl = sizeof(struct iphdr) >> 2; | 846 | iph->ihl = sizeof(struct iphdr) >> 2; |
847 | iph->frag_off = df; | 847 | iph->frag_off = df; |