diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-01-10 22:43:18 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:01:44 -0800 |
commit | bfeade087005278fc8cafe230b7658a4f40c5acb (patch) | |
tree | d9bbacab07552cc6c33f9f022a34af2391d9ecc1 /net/ipv6/datagram.c | |
parent | 3c40090a0f5b69deecc5ca615f994957f949333d (diff) | |
download | blackbird-obmc-linux-bfeade087005278fc8cafe230b7658a4f40c5acb.tar.gz blackbird-obmc-linux-bfeade087005278fc8cafe230b7658a4f40c5acb.zip |
[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/datagram.c')
-rw-r--r-- | net/ipv6/datagram.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index f49a06aa97de..94fa6ae77cfe 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -549,7 +549,8 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, return -ENODEV; } } - if (!ipv6_chk_addr(&src_info->ipi6_addr, dev, 0)) { + if (!ipv6_chk_addr(&init_net, &src_info->ipi6_addr, + dev, 0)) { if (dev) dev_put(dev); err = -EINVAL; |