diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/skbuff.h | 1 | ||||
-rw-r--r-- | include/linux/tcp.h | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e580416de78a..8f158d66d2a8 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 tcphdr *th; | ||
241 | struct iphdr *ipiph; | 240 | struct iphdr *ipiph; |
242 | struct ipv6hdr *ipv6h; | 241 | struct ipv6hdr *ipv6h; |
243 | unsigned char *raw; | 242 | unsigned char *raw; |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 244ae0dacf4a..911d937fb4c1 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -178,14 +178,19 @@ struct tcp_md5sig { | |||
178 | #include <net/inet_connection_sock.h> | 178 | #include <net/inet_connection_sock.h> |
179 | #include <net/inet_timewait_sock.h> | 179 | #include <net/inet_timewait_sock.h> |
180 | 180 | ||
181 | static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb) | ||
182 | { | ||
183 | return (struct tcphdr *)skb->h.raw; | ||
184 | } | ||
185 | |||
181 | static inline unsigned int tcp_hdrlen(const struct sk_buff *skb) | 186 | static inline unsigned int tcp_hdrlen(const struct sk_buff *skb) |
182 | { | 187 | { |
183 | return skb->h.th->doff * 4; | 188 | return tcp_hdr(skb)->doff * 4; |
184 | } | 189 | } |
185 | 190 | ||
186 | static inline unsigned int tcp_optlen(const struct sk_buff *skb) | 191 | static inline unsigned int tcp_optlen(const struct sk_buff *skb) |
187 | { | 192 | { |
188 | return (skb->h.th->doff - 5) * 4; | 193 | return (tcp_hdr(skb)->doff - 5) * 4; |
189 | } | 194 | } |
190 | 195 | ||
191 | /* This defines a selective acknowledgement block. */ | 196 | /* This defines a selective acknowledgement block. */ |