aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2008-01-11 01:43:18 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:44 -0500
commitbfeade087005278fc8cafe230b7658a4f40c5acb (patch)
treed9bbacab07552cc6c33f9f022a34af2391d9ecc1 /net/ipv6/ndisc.c
parent3c40090a0f5b69deecc5ca615f994957f949333d (diff)
[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/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b66a1f81bd83..e217d3ff00f3 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -653,7 +653,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
653 struct in6_addr *target = (struct in6_addr *)&neigh->primary_key; 653 struct in6_addr *target = (struct in6_addr *)&neigh->primary_key;
654 int probes = atomic_read(&neigh->probes); 654 int probes = atomic_read(&neigh->probes);
655 655
656 if (skb && ipv6_chk_addr(&ipv6_hdr(skb)->saddr, dev, 1)) 656 if (skb && ipv6_chk_addr(&init_net, &ipv6_hdr(skb)->saddr, dev, 1))
657 saddr = &ipv6_hdr(skb)->saddr; 657 saddr = &ipv6_hdr(skb)->saddr;
658 658
659 if ((probes -= neigh->parms->ucast_probes) < 0) { 659 if ((probes -= neigh->parms->ucast_probes) < 0) {