diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 1 | ||||
-rw-r--r-- | include/linux/tcp.h | 9 | ||||
-rw-r--r-- | include/net/tcp.h | 2 | ||||
-rw-r--r-- | include/net/tcp_ecn.h | 6 |
4 files changed, 11 insertions, 7 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. */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 6dacc352dcf1..af9273204cfd 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -984,7 +984,7 @@ static inline void tcp_openreq_init(struct request_sock *req, | |||
984 | ireq->wscale_ok = rx_opt->wscale_ok; | 984 | ireq->wscale_ok = rx_opt->wscale_ok; |
985 | ireq->acked = 0; | 985 | ireq->acked = 0; |
986 | ireq->ecn_ok = 0; | 986 | ireq->ecn_ok = 0; |
987 | ireq->rmt_port = skb->h.th->source; | 987 | ireq->rmt_port = tcp_hdr(skb)->source; |
988 | } | 988 | } |
989 | 989 | ||
990 | extern void tcp_enter_memory_pressure(void); | 990 | extern void tcp_enter_memory_pressure(void); |
diff --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h index 4629d77173f2..b5f7c6ac0880 100644 --- a/include/net/tcp_ecn.h +++ b/include/net/tcp_ecn.h | |||
@@ -54,7 +54,7 @@ static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp, | |||
54 | INET_ECN_xmit(sk); | 54 | INET_ECN_xmit(sk); |
55 | if (tp->ecn_flags&TCP_ECN_QUEUE_CWR) { | 55 | if (tp->ecn_flags&TCP_ECN_QUEUE_CWR) { |
56 | tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR; | 56 | tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR; |
57 | skb->h.th->cwr = 1; | 57 | tcp_hdr(skb)->cwr = 1; |
58 | skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; | 58 | skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; |
59 | } | 59 | } |
60 | } else { | 60 | } else { |
@@ -62,7 +62,7 @@ static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp, | |||
62 | INET_ECN_dontxmit(sk); | 62 | INET_ECN_dontxmit(sk); |
63 | } | 63 | } |
64 | if (tp->ecn_flags & TCP_ECN_DEMAND_CWR) | 64 | if (tp->ecn_flags & TCP_ECN_DEMAND_CWR) |
65 | skb->h.th->ece = 1; | 65 | tcp_hdr(skb)->ece = 1; |
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
@@ -70,7 +70,7 @@ static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp, | |||
70 | 70 | ||
71 | static inline void TCP_ECN_accept_cwr(struct tcp_sock *tp, struct sk_buff *skb) | 71 | static inline void TCP_ECN_accept_cwr(struct tcp_sock *tp, struct sk_buff *skb) |
72 | { | 72 | { |
73 | if (skb->h.th->cwr) | 73 | if (tcp_hdr(skb)->cwr) |
74 | tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR; | 74 | tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR; |
75 | } | 75 | } |
76 | 76 | ||