aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c1ce36237380..9c3b4c7a50ad 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -140,7 +140,7 @@ static void tcp_measure_rcv_mss(struct sock *sk,
140 * 140 *
141 * "len" is invariant segment length, including TCP header. 141 * "len" is invariant segment length, including TCP header.
142 */ 142 */
143 len += skb->data - skb->h.raw; 143 len += skb->data - skb_transport_header(skb);
144 if (len >= TCP_MIN_RCVMSS + sizeof(struct tcphdr) || 144 if (len >= TCP_MIN_RCVMSS + sizeof(struct tcphdr) ||
145 /* If PSH is not set, packet should be 145 /* If PSH is not set, packet should be
146 * full sized, provided peer TCP is not badly broken. 146 * full sized, provided peer TCP is not badly broken.
@@ -940,7 +940,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
940{ 940{
941 const struct inet_connection_sock *icsk = inet_csk(sk); 941 const struct inet_connection_sock *icsk = inet_csk(sk);
942 struct tcp_sock *tp = tcp_sk(sk); 942 struct tcp_sock *tp = tcp_sk(sk);
943 unsigned char *ptr = ack_skb->h.raw + TCP_SKB_CB(ack_skb)->sacked; 943 unsigned char *ptr = (skb_transport_header(ack_skb) +
944 TCP_SKB_CB(ack_skb)->sacked);
944 struct tcp_sack_block_wire *sp = (struct tcp_sack_block_wire *)(ptr+2); 945 struct tcp_sack_block_wire *sp = (struct tcp_sack_block_wire *)(ptr+2);
945 struct sk_buff *cached_skb; 946 struct sk_buff *cached_skb;
946 int num_sacks = (ptr[1] - TCPOLEN_SACK_BASE)>>3; 947 int num_sacks = (ptr[1] - TCPOLEN_SACK_BASE)>>3;
@@ -3634,10 +3635,10 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list,
3634 return; 3635 return;
3635 3636
3636 skb_set_mac_header(nskb, skb_mac_header(skb) - skb->head); 3637 skb_set_mac_header(nskb, skb_mac_header(skb) - skb->head);
3637 skb_set_network_header(nskb, 3638 skb_set_network_header(nskb, (skb_network_header(skb) -
3638 skb_network_header(skb) - skb->head); 3639 skb->head));
3639 skb_set_transport_header(nskb, skb->h.raw - skb->head); 3640 skb_set_transport_header(nskb, (skb_transport_header(skb) -
3640 3641 skb->head));
3641 skb_reserve(nskb, header); 3642 skb_reserve(nskb, header);
3642 memcpy(nskb->head, skb->head, header); 3643 memcpy(nskb->head, skb->head, header);
3643 memcpy(nskb->cb, skb->cb, sizeof(skb->cb)); 3644 memcpy(nskb->cb, skb->cb, sizeof(skb->cb));