diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 8 |
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) { |