aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-11 00:04:22 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:26 -0400
commitaa8223c7bb0b05183e1737881ed21827aa5b9e73 (patch)
tree05c9832326edfeb878472f15cf8133ed9f014cdf /net/ipv4/tcp_output.c
parentab6a5bb6b28a970104a34f0f6959b73cf61bdc72 (diff)
[SK_BUFF]: Introduce tcp_hdr(), remove skb->h.th
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index f19f5fb361b5..29c53fbb2204 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -465,11 +465,12 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
465 tcp_header_size += TCPOLEN_MD5SIG_ALIGNED; 465 tcp_header_size += TCPOLEN_MD5SIG_ALIGNED;
466#endif 466#endif
467 467
468 th = (struct tcphdr *) skb_push(skb, tcp_header_size); 468 skb_push(skb, tcp_header_size);
469 skb->h.th = th; 469 skb_reset_transport_header(skb);
470 skb_set_owner_w(skb, sk); 470 skb_set_owner_w(skb, sk);
471 471
472 /* Build TCP header and checksum it. */ 472 /* Build TCP header and checksum it. */
473 th = tcp_hdr(skb);
473 th->source = inet->sport; 474 th->source = inet->sport;
474 th->dest = inet->dport; 475 th->dest = inet->dport;
475 th->seq = htonl(tcb->seq); 476 th->seq = htonl(tcb->seq);
@@ -524,7 +525,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
524 tp->af_specific->calc_md5_hash(md5_hash_location, 525 tp->af_specific->calc_md5_hash(md5_hash_location,
525 md5, 526 md5,
526 sk, NULL, NULL, 527 sk, NULL, NULL,
527 skb->h.th, 528 tcp_hdr(skb),
528 sk->sk_protocol, 529 sk->sk_protocol,
529 skb->len); 530 skb->len);
530 } 531 }
@@ -2128,8 +2129,10 @@ struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst,
2128 if (md5) 2129 if (md5)
2129 tcp_header_size += TCPOLEN_MD5SIG_ALIGNED; 2130 tcp_header_size += TCPOLEN_MD5SIG_ALIGNED;
2130#endif 2131#endif
2131 skb->h.th = th = (struct tcphdr *) skb_push(skb, tcp_header_size); 2132 skb_push(skb, tcp_header_size);
2133 skb_reset_transport_header(skb);
2132 2134
2135 th = tcp_hdr(skb);
2133 memset(th, 0, sizeof(struct tcphdr)); 2136 memset(th, 0, sizeof(struct tcphdr));
2134 th->syn = 1; 2137 th->syn = 1;
2135 th->ack = 1; 2138 th->ack = 1;
@@ -2183,7 +2186,7 @@ struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst,
2183 tp->af_specific->calc_md5_hash(md5_hash_location, 2186 tp->af_specific->calc_md5_hash(md5_hash_location,
2184 md5, 2187 md5,
2185 NULL, dst, req, 2188 NULL, dst, req,
2186 skb->h.th, sk->sk_protocol, 2189 tcp_hdr(skb), sk->sk_protocol,
2187 skb->len); 2190 skb->len);
2188 } 2191 }
2189#endif 2192#endif