Skip to content

Commit

Permalink
[TCP]: MTUprobe: prepare skb fields earlier
Browse files Browse the repository at this point in the history
They better be valid when call to write_queue functions is made
once things that follow are going in.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Jan 28, 2008
1 parent c3a05c6 commit 50c4817
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,6 @@ static int tcp_mtu_probe(struct sock *sk)
sk_charge_skb(sk, nskb);

skb = tcp_send_head(sk);
tcp_insert_write_queue_before(nskb, skb, sk);

TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(skb)->seq;
TCP_SKB_CB(nskb)->end_seq = TCP_SKB_CB(skb)->seq + probe_size;
Expand All @@ -1351,6 +1350,8 @@ static int tcp_mtu_probe(struct sock *sk)
nskb->csum = 0;
nskb->ip_summed = skb->ip_summed;

tcp_insert_write_queue_before(nskb, skb, sk);

len = 0;
while (len < probe_size) {
next = tcp_write_queue_next(sk, skb);
Expand Down

0 comments on commit 50c4817

Please sign in to comment.