aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-10 23:50:43 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:59 -0400
commitd56f90a7c96da5187f0cdf07ee7434fe6aa78bbc (patch)
tree3b9073cecfbb3b6a1e25ab2b5dd2a22a43aef238 /net/ipv6/tcp_ipv6.c
parentbbe735e4247dba32568a305553b010081c8dea99 (diff)
[SK_BUFF]: Introduce skb_network_header()
For the places where we need a pointer to the network header, it is still legal to touch skb->nh.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/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 92f99927d12d..80a52ab1e384 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -486,7 +486,9 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
486 struct sk_buff *pktopts = treq->pktopts; 486 struct sk_buff *pktopts = treq->pktopts;
487 struct inet6_skb_parm *rxopt = IP6CB(pktopts); 487 struct inet6_skb_parm *rxopt = IP6CB(pktopts);
488 if (rxopt->srcrt) 488 if (rxopt->srcrt)
489 opt = ipv6_invert_rthdr(sk, (struct ipv6_rt_hdr*)(pktopts->nh.raw + rxopt->srcrt)); 489 opt = ipv6_invert_rthdr(sk,
490 (struct ipv6_rt_hdr *)(skb_network_header(pktopts) +
491 rxopt->srcrt));
490 } 492 }
491 493
492 if (opt && opt->srcrt) { 494 if (opt && opt->srcrt) {
@@ -1389,7 +1391,9 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1389 opt == NULL && treq->pktopts) { 1391 opt == NULL && treq->pktopts) {
1390 struct inet6_skb_parm *rxopt = IP6CB(treq->pktopts); 1392 struct inet6_skb_parm *rxopt = IP6CB(treq->pktopts);
1391 if (rxopt->srcrt) 1393 if (rxopt->srcrt)
1392 opt = ipv6_invert_rthdr(sk, (struct ipv6_rt_hdr *)(treq->pktopts->nh.raw + rxopt->srcrt)); 1394 opt = ipv6_invert_rthdr(sk,
1395 (struct ipv6_rt_hdr *)(skb_network_header(treq->pktopts) +
1396 rxopt->srcrt));
1393 } 1397 }
1394 1398
1395 if (dst == NULL) { 1399 if (dst == NULL) {