summaryrefslogtreecommitdiff
path: root/net/ipv6/anycast.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-01-11 06:43:18 (GMT)
committerDavid S. Miller <davem@davemloft.net>2008-01-28 23:01:44 (GMT)
commitbfeade087005278fc8cafe230b7658a4f40c5acb (patch)
treed9bbacab07552cc6c33f9f022a34af2391d9ecc1 /net/ipv6/anycast.c
parent3c40090a0f5b69deecc5ca615f994957f949333d (diff)
downloadlinux-bfeade087005278fc8cafe230b7658a4f40c5acb.tar.xz
[NETNS][IPV6]: inet6_addr - check ipv6 address per namespace
When a new address is added, we must check if the new address does not already exists. This patch makes this check to be aware of a network namespace, so the check will look if the address already exists for the specified network namespace. While the addresses are browsed, the addresses which do not belong to the namespace are discarded. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r--net/ipv6/anycast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 5c41900..9c7f83f 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -89,7 +89,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, struct in6_addr *addr)
return -EPERM;
if (ipv6_addr_is_multicast(addr))
return -EINVAL;
- if (ipv6_chk_addr(addr, NULL, 0))
+ if (ipv6_chk_addr(&init_net, addr, NULL, 0))
return -EINVAL;
pac = sock_kmalloc(sk, sizeof(struct ipv6_ac_socklist), GFP_KERNEL);