aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-03-17 20:31:13 +0000
committerDavid S. Miller <davem@davemloft.net>2010-03-20 15:45:09 -0700
commit502a2ffd7376ae27cfde6172257db0ff9d8cfec2 (patch)
treede51fc19a9442f3edd344f56ff1887b25a5da6c9 /drivers/net/bonding
parent3a88a81d89c20be312b3b219b185bbdde24b8fb8 (diff)
downloadkernel_samsung_smdk4412-502a2ffd7376ae27cfde6172257db0ff9d8cfec2.zip
kernel_samsung_smdk4412-502a2ffd7376ae27cfde6172257db0ff9d8cfec2.tar.gz
kernel_samsung_smdk4412-502a2ffd7376ae27cfde6172257db0ff9d8cfec2.tar.bz2
ipv6: convert idev_list to list macros
Convert to list macro's for the list of addresses per interface in IPv6. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_ipv6.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c
index 6dd64cf..969ffed 100644
--- a/drivers/net/bonding/bond_ipv6.c
+++ b/drivers/net/bonding/bond_ipv6.c
@@ -37,7 +37,6 @@
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;
@@ -47,10 +46,12 @@ static void bond_glean_dev_ipv6(struct net_device *dev, struct in6_addr *addr)
return;
read_lock_bh(&idev->lock);
- ifa = idev->addr_list;
- if (ifa)
+ if (!list_empty(&idev->addr_list)) {
+ struct inet6_ifaddr *ifa
+ = list_first_entry(&idev->addr_list,
+ struct inet6_ifaddr, if_list);
ipv6_addr_copy(addr, &ifa->addr);
- else
+ } else
ipv6_addr_set(addr, 0, 0, 0, 0);
read_unlock_bh(&idev->lock);