aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2008-01-10 06:25:28 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:27 -0500
commit6b175b26c1048d331508940ad3516ead1998084f (patch)
tree810b0a18cee4d87c573274fdfd4a59fc624cfed2 /net/ipv4/af_inet.c
parent8ad4942cd5bdad4143f7aa1d1bd4f7b2526c19c5 (diff)
[NETNS]: Add netns parameter to inet_(dev_)add_type.
The patch extends the inet_addr_type and inet_dev_addr_type with the network namespace pointer. That allows to access the different tables relatively to the network namespace. The modification of the signature function is reported in all the callers of the inet_addr_type using the pointer to the well known init_net. Acked-by: Benjamin Thery <benjamin.thery@bull.net> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 40ecaae7be32..d76f8d8d5eba 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(addr->sin_addr.s_addr); 449 chk_addr_ret = inet_addr_type(&init_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