/* Assign bond->master_ipv6 to the next IPv6 address in the list, or zero it out if there are none.  */
static void bond_glean_dev_ipv6(struct net_device *dev, struct in6_addr *addr)
/* Assign bond->master_ipv6 to the next IPv6 address in the list, or zero it out if there are none.  */
static void bond_glean_dev_ipv6(struct net_device *dev, struct in6_addr *addr)
{
	struct inet6_dev *idev;
	struct inet6_ifaddr *ifa;
	if (!dev)
		return;
	idev = in6_dev_get(dev);
	if (!idev)
		return;
	read_lock_bh(&idev->lock);
	ifa = idev->addr_list;
	if (ifa)
		ipv6_addr_copy(addr, &ifa->addr);
	else
		ipv6_addr_set(addr, 0, 0, 0, 0);
	read_unlock_bh(&idev->lock);
	in6_dev_put(idev);
}