diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-06-28 16:00:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-28 16:00:30 -0400 |
commit | ae9cda5d65f3d8a495241cbdcc2d56f721c83cc3 (patch) | |
tree | a2dad0af022411e53724bd965c535287975a05bc | |
parent | 8a47077a0b5aa2649751c46e7a27884e6686ccbf (diff) |
[IPV6]: Don't dump temporary addresses twice
Each IPv6 Temporary Address (w/ CONFIG_IPV6_PRIVACY) is dumped twice
to netlink.
Because temporary addresses are listed in idev->addr_list,
there's no need to dump idev->tempaddr separately.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv6/addrconf.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 1b2902d8eb98..77004b9456c0 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2777,7 +2777,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, | |||
2777 | read_lock_bh(&idev->lock); | 2777 | read_lock_bh(&idev->lock); |
2778 | switch (type) { | 2778 | switch (type) { |
2779 | case UNICAST_ADDR: | 2779 | case UNICAST_ADDR: |
2780 | /* unicast address */ | 2780 | /* unicast address incl. temp addr */ |
2781 | for (ifa = idev->addr_list; ifa; | 2781 | for (ifa = idev->addr_list; ifa; |
2782 | ifa = ifa->if_next, ip_idx++) { | 2782 | ifa = ifa->if_next, ip_idx++) { |
2783 | if (ip_idx < s_ip_idx) | 2783 | if (ip_idx < s_ip_idx) |
@@ -2788,19 +2788,6 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, | |||
2788 | NLM_F_MULTI)) <= 0) | 2788 | NLM_F_MULTI)) <= 0) |
2789 | goto done; | 2789 | goto done; |
2790 | } | 2790 | } |
2791 | /* temp addr */ | ||
2792 | #ifdef CONFIG_IPV6_PRIVACY | ||
2793 | for (ifa = idev->tempaddr_list; ifa; | ||
2794 | ifa = ifa->tmp_next, ip_idx++) { | ||
2795 | if (ip_idx < s_ip_idx) | ||
2796 | continue; | ||
2797 | if ((err = inet6_fill_ifaddr(skb, ifa, | ||
2798 | NETLINK_CB(cb->skb).pid, | ||
2799 | cb->nlh->nlmsg_seq, RTM_NEWADDR, | ||
2800 | NLM_F_MULTI)) <= 0) | ||
2801 | goto done; | ||
2802 | } | ||
2803 | #endif | ||
2804 | break; | 2791 | break; |
2805 | case MULTICAST_ADDR: | 2792 | case MULTICAST_ADDR: |
2806 | /* multicast address */ | 2793 | /* multicast address */ |