Commit ae9cda5d authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

[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: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8a47077a
...@@ -2777,7 +2777,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -2777,7 +2777,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
read_lock_bh(&idev->lock); read_lock_bh(&idev->lock);
switch (type) { switch (type) {
case UNICAST_ADDR: case UNICAST_ADDR:
/* unicast address */ /* unicast address incl. temp addr */
for (ifa = idev->addr_list; ifa; for (ifa = idev->addr_list; ifa;
ifa = ifa->if_next, ip_idx++) { ifa = ifa->if_next, ip_idx++) {
if (ip_idx < s_ip_idx) if (ip_idx < s_ip_idx)
...@@ -2788,19 +2788,6 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, ...@@ -2788,19 +2788,6 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
NLM_F_MULTI)) <= 0) NLM_F_MULTI)) <= 0)
goto done; goto done;
} }
/* temp addr */
#ifdef CONFIG_IPV6_PRIVACY
for (ifa = idev->tempaddr_list; ifa;
ifa = ifa->tmp_next, ip_idx++) {
if (ip_idx < s_ip_idx)
continue;
if ((err = inet6_fill_ifaddr(skb, ifa,
NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, RTM_NEWADDR,
NLM_F_MULTI)) <= 0)
goto done;
}
#endif
break; break;
case MULTICAST_ADDR: case MULTICAST_ADDR:
/* multicast address */ /* multicast address */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment