diff options
author | Denis V. Lunev <den@openvz.org> | 2008-03-24 18:31:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 18:31:35 -0400 |
commit | 05cf89d40c85e622dac20e44713168767be5c520 (patch) | |
tree | 81e7826794b95fe027ba8ecb10134460d42d1196 /net/ipv4/af_inet.c | |
parent | cb84663e4d239f23f0d872bc6463c272e74daad8 (diff) |
[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>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 44f5ce1fbfa4..a9e241cdc5b2 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -446,7 +446,7 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
446 | if (addr_len < sizeof(struct sockaddr_in)) | 446 | if (addr_len < sizeof(struct sockaddr_in)) |
447 | goto out; | 447 | goto out; |
448 | 448 | ||
449 | chk_addr_ret = inet_addr_type(&init_net, addr->sin_addr.s_addr); | 449 | chk_addr_ret = inet_addr_type(sk->sk_net, addr->sin_addr.s_addr); |
450 | 450 | ||
451 | /* Not specified by any standard per-se, however it breaks too | 451 | /* Not specified by any standard per-se, however it breaks too |
452 | * many applications when removed. It is unfortunate since | 452 | * many applications when removed. It is unfortunate since |
@@ -1114,7 +1114,7 @@ int inet_sk_rebuild_header(struct sock *sk) | |||
1114 | }; | 1114 | }; |
1115 | 1115 | ||
1116 | security_sk_classify_flow(sk, &fl); | 1116 | security_sk_classify_flow(sk, &fl); |
1117 | err = ip_route_output_flow(&init_net, &rt, &fl, sk, 0); | 1117 | err = ip_route_output_flow(sk->sk_net, &rt, &fl, sk, 0); |
1118 | } | 1118 | } |
1119 | if (!err) | 1119 | if (!err) |
1120 | sk_setup_caps(sk, &rt->u.dst); | 1120 | sk_setup_caps(sk, &rt->u.dst); |