diff options
-rw-r--r-- | drivers/net/sk98lin/skge.c | 4 | ||||
-rw-r--r-- | drivers/net/skge.c | 2 | ||||
-rw-r--r-- | include/linux/ip.h | 5 | ||||
-rw-r--r-- | include/linux/skbuff.h | 1 | ||||
-rw-r--r-- | net/ipv4/xfrm4_mode_beet.c | 6 | ||||
-rw-r--r-- | net/ipv4/xfrm4_mode_tunnel.c | 6 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_tunnel.c | 2 |
7 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index e4ab7a8acc1a..b987a5c3f42a 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c | |||
@@ -1565,7 +1565,7 @@ struct sk_buff *pMessage) /* pointer to send-message */ | |||
1565 | u16 hdrlen = skb_transport_offset(pMessage); | 1565 | u16 hdrlen = skb_transport_offset(pMessage); |
1566 | u16 offset = hdrlen + pMessage->csum_offset; | 1566 | u16 offset = hdrlen + pMessage->csum_offset; |
1567 | 1567 | ||
1568 | if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) && | 1568 | if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) && |
1569 | (pAC->GIni.GIChipRev == 0) && | 1569 | (pAC->GIni.GIChipRev == 0) && |
1570 | (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { | 1570 | (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { |
1571 | pTxd->TBControl = BMU_TCP_CHECK; | 1571 | pTxd->TBControl = BMU_TCP_CHECK; |
@@ -1691,7 +1691,7 @@ struct sk_buff *pMessage) /* pointer to send-message */ | |||
1691 | ** opcode for udp is not working in the hardware yet | 1691 | ** opcode for udp is not working in the hardware yet |
1692 | ** (Revision 2.0) | 1692 | ** (Revision 2.0) |
1693 | */ | 1693 | */ |
1694 | if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) && | 1694 | if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) && |
1695 | (pAC->GIni.GIChipRev == 0) && | 1695 | (pAC->GIni.GIChipRev == 0) && |
1696 | (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { | 1696 | (pAC->GIni.GIChipId == CHIP_ID_YUKON)) { |
1697 | Control |= BMU_TCP_CHECK; | 1697 | Control |= BMU_TCP_CHECK; |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index ca7a0e039849..99b61cfb7ce6 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -2659,7 +2659,7 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
2659 | /* This seems backwards, but it is what the sk98lin | 2659 | /* This seems backwards, but it is what the sk98lin |
2660 | * does. Looks like hardware is wrong? | 2660 | * does. Looks like hardware is wrong? |
2661 | */ | 2661 | */ |
2662 | if (skb->h.ipiph->protocol == IPPROTO_UDP | 2662 | if (ipip_hdr(skb)->protocol == IPPROTO_UDP |
2663 | && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON) | 2663 | && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON) |
2664 | control = BMU_TCP_CHECK; | 2664 | control = BMU_TCP_CHECK; |
2665 | else | 2665 | else |
diff --git a/include/linux/ip.h b/include/linux/ip.h index f2f26db16f57..19578440b5fc 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h | |||
@@ -111,6 +111,11 @@ static inline struct iphdr *ip_hdr(const struct sk_buff *skb) | |||
111 | { | 111 | { |
112 | return (struct iphdr *)skb_network_header(skb); | 112 | return (struct iphdr *)skb_network_header(skb); |
113 | } | 113 | } |
114 | |||
115 | static inline struct iphdr *ipip_hdr(const struct sk_buff *skb) | ||
116 | { | ||
117 | return (struct iphdr *)skb->h.raw; | ||
118 | } | ||
114 | #endif | 119 | #endif |
115 | 120 | ||
116 | struct ip_auth_hdr { | 121 | struct ip_auth_hdr { |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 8f158d66d2a8..862a81cf7f74 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -237,7 +237,6 @@ struct sk_buff { | |||
237 | /* 4 byte hole on 64 bit*/ | 237 | /* 4 byte hole on 64 bit*/ |
238 | 238 | ||
239 | union { | 239 | union { |
240 | struct iphdr *ipiph; | ||
241 | struct ipv6hdr *ipv6h; | 240 | struct ipv6hdr *ipv6h; |
242 | unsigned char *raw; | 241 | unsigned char *raw; |
243 | } h; | 242 | } h; |
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index 9e5ba12c6c75..32fcfc0b5c8c 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -83,7 +83,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
83 | 83 | ||
84 | if (!pskb_may_pull(skb, sizeof(*ph))) | 84 | if (!pskb_may_pull(skb, sizeof(*ph))) |
85 | goto out; | 85 | goto out; |
86 | ph = (struct ip_beet_phdr *)(skb->h.ipiph + 1); | 86 | ph = (struct ip_beet_phdr *)(ipip_hdr(skb) + 1); |
87 | 87 | ||
88 | phlen = sizeof(*ph) + ph->padlen; | 88 | phlen = sizeof(*ph) + ph->padlen; |
89 | optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen); | 89 | optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen); |
@@ -97,9 +97,9 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
97 | ph_nexthdr = ph->nexthdr; | 97 | ph_nexthdr = ph->nexthdr; |
98 | } | 98 | } |
99 | 99 | ||
100 | skb->nh.raw = skb->data + (phlen - sizeof(*iph)); | 100 | skb_set_network_header(skb, phlen - sizeof(*iph)); |
101 | memmove(skb_network_header(skb), iph, sizeof(*iph)); | 101 | memmove(skb_network_header(skb), iph, sizeof(*iph)); |
102 | skb->h.raw = skb->data + (phlen + optlen); | 102 | skb_set_transport_header(skb, phlen + optlen); |
103 | skb->data = skb->h.raw; | 103 | skb->data = skb->h.raw; |
104 | 104 | ||
105 | iph = ip_hdr(skb); | 105 | iph = ip_hdr(skb); |
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index edba75610a46..521e52f055c1 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -17,7 +17,7 @@ | |||
17 | static inline void ipip_ecn_decapsulate(struct sk_buff *skb) | 17 | static inline void ipip_ecn_decapsulate(struct sk_buff *skb) |
18 | { | 18 | { |
19 | struct iphdr *outer_iph = ip_hdr(skb); | 19 | struct iphdr *outer_iph = ip_hdr(skb); |
20 | struct iphdr *inner_iph = skb->h.ipiph; | 20 | struct iphdr *inner_iph = ipip_hdr(skb); |
21 | 21 | ||
22 | if (INET_ECN_is_ce(outer_iph->tos)) | 22 | if (INET_ECN_is_ce(outer_iph->tos)) |
23 | IP_ECN_set_ce(inner_iph); | 23 | IP_ECN_set_ce(inner_iph); |
@@ -47,7 +47,7 @@ static int xfrm4_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
47 | int flags; | 47 | int flags; |
48 | 48 | ||
49 | iph = ip_hdr(skb); | 49 | iph = ip_hdr(skb); |
50 | skb->h.ipiph = iph; | 50 | skb->h.raw = skb->nh.raw; |
51 | 51 | ||
52 | skb_push(skb, x->props.header_len); | 52 | skb_push(skb, x->props.header_len); |
53 | skb_reset_network_header(skb); | 53 | skb_reset_network_header(skb); |
@@ -116,7 +116,7 @@ static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) | |||
116 | iph = ip_hdr(skb); | 116 | iph = ip_hdr(skb); |
117 | if (iph->protocol == IPPROTO_IPIP) { | 117 | if (iph->protocol == IPPROTO_IPIP) { |
118 | if (x->props.flags & XFRM_STATE_DECAP_DSCP) | 118 | if (x->props.flags & XFRM_STATE_DECAP_DSCP) |
119 | ipv4_copy_dscp(iph, skb->h.ipiph); | 119 | ipv4_copy_dscp(iph, ipip_hdr(skb)); |
120 | if (!(x->props.flags & XFRM_STATE_NOECN)) | 120 | if (!(x->props.flags & XFRM_STATE_NOECN)) |
121 | ipip_ecn_decapsulate(skb); | 121 | ipip_ecn_decapsulate(skb); |
122 | } | 122 | } |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 28f36b363d1f..9d3bd338e5d0 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -28,7 +28,7 @@ static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) | |||
28 | static inline void ip6ip_ecn_decapsulate(struct sk_buff *skb) | 28 | static inline void ip6ip_ecn_decapsulate(struct sk_buff *skb) |
29 | { | 29 | { |
30 | if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6_hdr(skb)))) | 30 | if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6_hdr(skb)))) |
31 | IP_ECN_set_ce(skb->h.ipiph); | 31 | IP_ECN_set_ce(ipip_hdr(skb)); |
32 | } | 32 | } |
33 | 33 | ||
34 | /* Add encapsulation header. | 34 | /* Add encapsulation header. |