]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
tcp: use correct net ns in cookie_v4_check()
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 3 Jun 2010 05:45:47 +0000 (05:45 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:26:25 +0000 (10:26 -0700)
[ Upstream commit c44649216522cd607a4027d2ebf4a8147d3fa94c ]

Its better to make a route lookup in appropriate namespace.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/syncookies.c

index 66fd80ef247337d03f84fd264aab748f60346297..214a2f656a5ed2b01aa785fe6d7c4918062c111a 100644 (file)
@@ -347,7 +347,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
                                               { .sport = th->dest,
                                                 .dport = th->source } } };
                security_req_classify_flow(req, &fl);
-               if (ip_route_output_key(&init_net, &rt, &fl)) {
+               if (ip_route_output_key(sock_net(sk), &rt, &fl)) {
                        reqsk_free(req);
                        goto out;
                }