[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>
This commit is contained in:
committed by
David S. Miller
parent
3c40090a0f
commit
bfeade0870
@@ -653,7 +653,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
|
||||
struct in6_addr *target = (struct in6_addr *)&neigh->primary_key;
|
||||
int probes = atomic_read(&neigh->probes);
|
||||
|
||||
if (skb && ipv6_chk_addr(&ipv6_hdr(skb)->saddr, dev, 1))
|
||||
if (skb && ipv6_chk_addr(&init_net, &ipv6_hdr(skb)->saddr, dev, 1))
|
||||
saddr = &ipv6_hdr(skb)->saddr;
|
||||
|
||||
if ((probes -= neigh->parms->ucast_probes) < 0) {
|
||||
|
Reference in New Issue
Block a user