diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-01-11 01:43:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:44 -0500 |
commit | bfeade087005278fc8cafe230b7658a4f40c5acb (patch) | |
tree | d9bbacab07552cc6c33f9f022a34af2391d9ecc1 /net/ipv6/ip6_tunnel.c | |
parent | 3c40090a0f5b69deecc5ca615f994957f949333d (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/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 29b5321e39c3..425c9ae8b315 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -653,8 +653,8 @@ static inline int ip6_tnl_rcv_ctl(struct ip6_tnl *t) | |||
653 | ldev = dev_get_by_index(&init_net, p->link); | 653 | ldev = dev_get_by_index(&init_net, p->link); |
654 | 654 | ||
655 | if ((ipv6_addr_is_multicast(&p->laddr) || | 655 | if ((ipv6_addr_is_multicast(&p->laddr) || |
656 | likely(ipv6_chk_addr(&p->laddr, ldev, 0))) && | 656 | likely(ipv6_chk_addr(&init_net, &p->laddr, ldev, 0))) && |
657 | likely(!ipv6_chk_addr(&p->raddr, NULL, 0))) | 657 | likely(!ipv6_chk_addr(&init_net, &p->raddr, NULL, 0))) |
658 | ret = 1; | 658 | ret = 1; |
659 | 659 | ||
660 | if (ldev) | 660 | if (ldev) |
@@ -788,12 +788,12 @@ static inline int ip6_tnl_xmit_ctl(struct ip6_tnl *t) | |||
788 | if (p->link) | 788 | if (p->link) |
789 | ldev = dev_get_by_index(&init_net, p->link); | 789 | ldev = dev_get_by_index(&init_net, p->link); |
790 | 790 | ||
791 | if (unlikely(!ipv6_chk_addr(&p->laddr, ldev, 0))) | 791 | if (unlikely(!ipv6_chk_addr(&init_net, &p->laddr, ldev, 0))) |
792 | printk(KERN_WARNING | 792 | printk(KERN_WARNING |
793 | "%s xmit: Local address not yet configured!\n", | 793 | "%s xmit: Local address not yet configured!\n", |
794 | p->name); | 794 | p->name); |
795 | else if (!ipv6_addr_is_multicast(&p->raddr) && | 795 | else if (!ipv6_addr_is_multicast(&p->raddr) && |
796 | unlikely(ipv6_chk_addr(&p->raddr, NULL, 0))) | 796 | unlikely(ipv6_chk_addr(&init_net, &p->raddr, NULL, 0))) |
797 | printk(KERN_WARNING | 797 | printk(KERN_WARNING |
798 | "%s xmit: Routing loop! " | 798 | "%s xmit: Routing loop! " |
799 | "Remote address found on this node!\n", | 799 | "Remote address found on this node!\n", |