aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 21:04:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:31 -0400
commit9c70220b73908f64792422a2c39c593c4792f2c5 (patch)
tree2090ea10aaa2714a5e095bae8cc02e743c378a3a /net/ipv4/ip_output.c
parenta27ef749e7be3b06fb58df53d94eb97a21f18707 (diff)
[SK_BUFF]: Introduce skb_transport_header(skb)
For the places where we need a pointer to the transport header, it is still legal to touch skb->h.raw directly if just adding to, subtracting from or setting it to another layer header. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 602268661eb3..11029b9d4cf7 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1128,7 +1128,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
1128 if (fraggap) { 1128 if (fraggap) {
1129 skb->csum = skb_copy_and_csum_bits(skb_prev, 1129 skb->csum = skb_copy_and_csum_bits(skb_prev,
1130 maxfraglen, 1130 maxfraglen,
1131 skb->h.raw, 1131 skb_transport_header(skb),
1132 fraggap, 0); 1132 fraggap, 0);
1133 skb_prev->csum = csum_sub(skb_prev->csum, 1133 skb_prev->csum = csum_sub(skb_prev->csum,
1134 skb->csum); 1134 skb->csum);
@@ -1374,7 +1374,9 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
1374 &ipc, rt, MSG_DONTWAIT); 1374 &ipc, rt, MSG_DONTWAIT);
1375 if ((skb = skb_peek(&sk->sk_write_queue)) != NULL) { 1375 if ((skb = skb_peek(&sk->sk_write_queue)) != NULL) {
1376 if (arg->csumoffset >= 0) 1376 if (arg->csumoffset >= 0)
1377 *((__sum16 *)skb->h.raw + arg->csumoffset) = csum_fold(csum_add(skb->csum, arg->csum)); 1377 *((__sum16 *)skb_transport_header(skb) +
1378 arg->csumoffset) = csum_fold(csum_add(skb->csum,
1379 arg->csum));
1378 skb->ip_summed = CHECKSUM_NONE; 1380 skb->ip_summed = CHECKSUM_NONE;
1379 ip_push_pending_frames(sk); 1381 ip_push_pending_frames(sk);
1380 } 1382 }