aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-05-31 18:27:07 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-02 18:06:26 -0700
commitcd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca (patch)
tree8bf4492b4e338e119927028e1a3a9a2f8959a224 /net/ipv6/addrconf.c
parentnetfilter: use in_dev_for_each_ifa_rcu (diff)
downloadlinux-dev-cd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca.tar.xz
linux-dev-cd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca.zip
net: use new in_dev_ifa iterators
Use in_dev_for_each_ifa_rcu/rtnl instead. This prevents sparse warnings once proper __rcu annotations are added. Signed-off-by: Florian Westphal <fw@strlen.de> t di# Last commands done (6 commands done): Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6b673d4f5ca9..4c30726fa7c7 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3127,11 +3127,9 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
struct in_device *in_dev = __in_dev_get_rtnl(dev);
if (in_dev && (dev->flags & IFF_UP)) {
struct in_ifaddr *ifa;
-
int flag = scope;
- for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
-
+ in_dev_for_each_ifa_rtnl(ifa, in_dev) {
addr.s6_addr32[3] = ifa->ifa_local;
if (ifa->ifa_scope == RT_SCOPE_LINK)