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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jun 2010 22:56:03 +0000 (15:56 -0700)
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>
net/ipv4/syncookies.c

index 5c24db4a3c91a54d7d6b3b86e8d4d906999d7d76..9f6b22206c527263fea9c56727967afd92b773bb 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;
                }