提交 c4464921 编写于 作者: E Eric Dumazet 提交者: David S. Miller

tcp: use correct net ns in cookie_v4_check()

Its better to make a route lookup in appropriate namespace.
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ca55158c
...@@ -347,7 +347,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, ...@@ -347,7 +347,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
{ .sport = th->dest, { .sport = th->dest,
.dport = th->source } } }; .dport = th->source } } };
security_req_classify_flow(req, &fl); 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); reqsk_free(req);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册