diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-01-11 01:44:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:45 -0500 |
commit | 1cab3da6be6c7659f62d0d297b389cc0e48b2178 (patch) | |
tree | f5a3e8a21136322625cb61dcf94d3edfac5ab7d1 /net/ipv6/ndisc.c | |
parent | 06bfe655e7db7719c0eb51eb420fb9c2a6aa1e00 (diff) |
[NETNS][IPV6]: inet6_addr - ipv6_get_ifaddr namespace aware
The inet6_addr_lst is browsed taking into account the network
namespace specified as parameter. If an address does not belong
to the specified namespace, it is ignored.
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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index e217d3ff00f3..bdfc4ea61941 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -556,7 +556,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
556 | }; | 556 | }; |
557 | 557 | ||
558 | /* for anycast or proxy, solicited_addr != src_addr */ | 558 | /* for anycast or proxy, solicited_addr != src_addr */ |
559 | ifp = ipv6_get_ifaddr(solicited_addr, dev, 1); | 559 | ifp = ipv6_get_ifaddr(&init_net, solicited_addr, dev, 1); |
560 | if (ifp) { | 560 | if (ifp) { |
561 | src_addr = solicited_addr; | 561 | src_addr = solicited_addr; |
562 | if (ifp->flags & IFA_F_OPTIMISTIC) | 562 | if (ifp->flags & IFA_F_OPTIMISTIC) |
@@ -616,7 +616,8 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr, | |||
616 | * suppress the inclusion of the sllao. | 616 | * suppress the inclusion of the sllao. |
617 | */ | 617 | */ |
618 | if (send_sllao) { | 618 | if (send_sllao) { |
619 | struct inet6_ifaddr *ifp = ipv6_get_ifaddr(saddr, dev, 1); | 619 | struct inet6_ifaddr *ifp = ipv6_get_ifaddr(&init_net, saddr, |
620 | dev, 1); | ||
620 | if (ifp) { | 621 | if (ifp) { |
621 | if (ifp->flags & IFA_F_OPTIMISTIC) { | 622 | if (ifp->flags & IFA_F_OPTIMISTIC) { |
622 | send_sllao = 0; | 623 | send_sllao = 0; |
@@ -741,7 +742,7 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
741 | 742 | ||
742 | inc = ipv6_addr_is_multicast(daddr); | 743 | inc = ipv6_addr_is_multicast(daddr); |
743 | 744 | ||
744 | if ((ifp = ipv6_get_ifaddr(&msg->target, dev, 1)) != NULL) { | 745 | if ((ifp = ipv6_get_ifaddr(&init_net, &msg->target, dev, 1)) != NULL) { |
745 | 746 | ||
746 | if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) { | 747 | if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) { |
747 | if (dad) { | 748 | if (dad) { |
@@ -899,7 +900,7 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
899 | return; | 900 | return; |
900 | } | 901 | } |
901 | } | 902 | } |
902 | if ((ifp = ipv6_get_ifaddr(&msg->target, dev, 1))) { | 903 | if ((ifp = ipv6_get_ifaddr(&init_net, &msg->target, dev, 1))) { |
903 | if (ifp->flags & IFA_F_TENTATIVE) { | 904 | if (ifp->flags & IFA_F_TENTATIVE) { |
904 | addrconf_dad_failure(ifp); | 905 | addrconf_dad_failure(ifp); |
905 | return; | 906 | return; |