diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index ea37741062a9..53b6a4192b16 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -981,9 +981,10 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, | |||
| 981 | struct tcphdr *th = tcp_hdr(skb), *t1; | 981 | struct tcphdr *th = tcp_hdr(skb), *t1; |
| 982 | struct sk_buff *buff; | 982 | struct sk_buff *buff; |
| 983 | struct flowi fl; | 983 | struct flowi fl; |
| 984 | struct net *net = dev_net(skb->dst->dev); | 984 | struct net *net = dev_net(skb_dst(skb)->dev); |
| 985 | struct sock *ctl_sk = net->ipv6.tcp_sk; | 985 | struct sock *ctl_sk = net->ipv6.tcp_sk; |
| 986 | unsigned int tot_len = sizeof(struct tcphdr); | 986 | unsigned int tot_len = sizeof(struct tcphdr); |
| 987 | struct dst_entry *dst; | ||
| 987 | __be32 *topt; | 988 | __be32 *topt; |
| 988 | 989 | ||
| 989 | if (ts) | 990 | if (ts) |
| @@ -1052,8 +1053,9 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, | |||
| 1052 | * Underlying function will use this to retrieve the network | 1053 | * Underlying function will use this to retrieve the network |
| 1053 | * namespace | 1054 | * namespace |
| 1054 | */ | 1055 | */ |
| 1055 | if (!ip6_dst_lookup(ctl_sk, &buff->dst, &fl)) { | 1056 | if (!ip6_dst_lookup(ctl_sk, &dst, &fl)) { |
| 1056 | if (xfrm_lookup(net, &buff->dst, &fl, NULL, 0) >= 0) { | 1057 | if (xfrm_lookup(net, &dst, &fl, NULL, 0) >= 0) { |
| 1058 | skb_dst_set(buff, dst); | ||
| 1057 | ip6_xmit(ctl_sk, buff, &fl, NULL, 0); | 1059 | ip6_xmit(ctl_sk, buff, &fl, NULL, 0); |
| 1058 | TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); | 1060 | TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS); |
| 1059 | if (rst) | 1061 | if (rst) |
