[NETNS]: Process INET socket layer in the correct namespace.
Replace all the reast of the init_net with a proper net on the socket layer. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
cb84663e4d
commit
05cf89d40c
@@ -446,7 +446,7 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
if (addr_len < sizeof(struct sockaddr_in))
|
||||
goto out;
|
||||
|
||||
chk_addr_ret = inet_addr_type(&init_net, addr->sin_addr.s_addr);
|
||||
chk_addr_ret = inet_addr_type(sk->sk_net, addr->sin_addr.s_addr);
|
||||
|
||||
/* Not specified by any standard per-se, however it breaks too
|
||||
* many applications when removed. It is unfortunate since
|
||||
@@ -1114,7 +1114,7 @@ int inet_sk_rebuild_header(struct sock *sk)
|
||||
};
|
||||
|
||||
security_sk_classify_flow(sk, &fl);
|
||||
err = ip_route_output_flow(&init_net, &rt, &fl, sk, 0);
|
||||
err = ip_route_output_flow(sk->sk_net, &rt, &fl, sk, 0);
|
||||
}
|
||||
if (!err)
|
||||
sk_setup_caps(sk, &rt->u.dst);
|
||||
|
Reference in New Issue
Block a user