From 16b673d7808c8257f90e633ad94b62d2c2c49c2c Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Fri, 7 Mar 2008 11:16:26 -0800 Subject: [PATCH] --- yaml --- r: 90055 b: refs/heads/master c: e504799276e53045a9b597f24c1b456552482f63 h: refs/heads/master i: 90053: 073dc51c9096288c35c57ae32ea585c611ddf42b 90051: 897287189088f14b2a3a6cddcba2502cd64e983d 90047: 946850e6c3a22ac2c7b2a22e36fb39c255028901 v: v3 --- [refs] | 2 +- trunk/net/ipv6/tcp_ipv6.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index d27550bab8bd..a95fc2ba5352 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 93ec926b075d14bb7edcbc054e92199e9ad4ad1d +refs/heads/master: e504799276e53045a9b597f24c1b456552482f63 diff --git a/trunk/net/ipv6/tcp_ipv6.c b/trunk/net/ipv6/tcp_ipv6.c index 7954b4e99c4f..caf0cc1c00e1 100644 --- a/trunk/net/ipv6/tcp_ipv6.c +++ b/trunk/net/ipv6/tcp_ipv6.c @@ -988,6 +988,8 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb) struct tcphdr *th = tcp_hdr(skb), *t1; struct sk_buff *buff; struct flowi fl; + struct net *net = skb->dst->dev->nd_net; + struct sock *ctl_sk = net->ipv6.tcp_sk; unsigned int tot_len = sizeof(*th); #ifdef CONFIG_TCP_MD5SIG struct tcp_md5sig_key *key; @@ -1072,11 +1074,10 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb) * Underlying function will use this to retrieve the network * namespace */ - if (!ip6_dst_lookup(init_net.ipv6.tcp_sk, &buff->dst, &fl)) { + if (!ip6_dst_lookup(ctl_sk, &buff->dst, &fl)) { if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) { - ip6_xmit(init_net.ipv6.tcp_sk, - buff, &fl, NULL, 0); + ip6_xmit(ctl_sk, buff, &fl, NULL, 0); TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); TCP_INC_STATS_BH(TCP_MIB_OUTRSTS); return; @@ -1092,6 +1093,8 @@ static void tcp_v6_send_ack(struct tcp_timewait_sock *tw, struct tcphdr *th = tcp_hdr(skb), *t1; struct sk_buff *buff; struct flowi fl; + struct net *net = skb->dev->nd_net; + struct sock *ctl_sk = net->ipv6.tcp_sk; unsigned int tot_len = sizeof(struct tcphdr); __be32 *topt; #ifdef CONFIG_TCP_MD5SIG @@ -1173,10 +1176,9 @@ static void tcp_v6_send_ack(struct tcp_timewait_sock *tw, fl.fl_ip_sport = t1->source; security_skb_classify_flow(skb, &fl); - if (!ip6_dst_lookup(init_net.ipv6.tcp_sk, &buff->dst, &fl)) { + if (!ip6_dst_lookup(ctl_sk, &buff->dst, &fl)) { if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) { - ip6_xmit(init_net.ipv6.tcp_sk, - buff, &fl, NULL, 0); + ip6_xmit(ctl_sk, buff, &fl, NULL, 0); TCP_INC_STATS_BH(TCP_MIB_OUTSEGS); return; }