diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-03-17 16:31:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-20 18:45:09 -0400 |
commit | 502a2ffd7376ae27cfde6172257db0ff9d8cfec2 (patch) | |
tree | de51fc19a9442f3edd344f56ff1887b25a5da6c9 /drivers/net/bonding/bond_ipv6.c | |
parent | 3a88a81d89c20be312b3b219b185bbdde24b8fb8 (diff) |
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/bond_ipv6.c')
-rw-r--r-- | drivers/net/bonding/bond_ipv6.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c index 6dd64cf3cb76..969ffed86b9f 100644 --- a/drivers/net/bonding/bond_ipv6.c +++ b/drivers/net/bonding/bond_ipv6.c | |||
@@ -37,7 +37,6 @@ | |||
37 | static void bond_glean_dev_ipv6(struct net_device *dev, struct in6_addr *addr) | 37 | static void bond_glean_dev_ipv6(struct net_device *dev, struct in6_addr *addr) |
38 | { | 38 | { |
39 | struct inet6_dev *idev; | 39 | struct inet6_dev *idev; |
40 | struct inet6_ifaddr *ifa; | ||
41 | 40 | ||
42 | if (!dev) | 41 | if (!dev) |
43 | return; | 42 | return; |
@@ -47,10 +46,12 @@ static void bond_glean_dev_ipv6(struct net_device *dev, struct in6_addr *addr) | |||
47 | return; | 46 | return; |
48 | 47 | ||
49 | read_lock_bh(&idev->lock); | 48 | read_lock_bh(&idev->lock); |
50 | ifa = idev->addr_list; | 49 | if (!list_empty(&idev->addr_list)) { |
51 | if (ifa) | 50 | struct inet6_ifaddr *ifa |
51 | = list_first_entry(&idev->addr_list, | ||
52 | struct inet6_ifaddr, if_list); | ||
52 | ipv6_addr_copy(addr, &ifa->addr); | 53 | ipv6_addr_copy(addr, &ifa->addr); |
53 | else | 54 | } else |
54 | ipv6_addr_set(addr, 0, 0, 0, 0); | 55 | ipv6_addr_set(addr, 0, 0, 0, 0); |
55 | 56 | ||
56 | read_unlock_bh(&idev->lock); | 57 | read_unlock_bh(&idev->lock); |