summary refs log tree commit diff
path: root/net/ipv4/igmp.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/ipv4/igmp.c
parentb8d19572367bb019f77bbc921ef6bf965f1c8b22 (diff)
downloadlinux-cd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca.tar.gz
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/ipv4/igmp.c')
-rw-r--r--net/ipv4/igmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index eb03153dfe12..fa5732bcfc76 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -336,14 +336,15 @@ static __be32 igmpv3_get_srcaddr(struct net_device *dev,
 				 const struct flowi4 *fl4)
 {
 	struct in_device *in_dev = __in_dev_get_rcu(dev);
+	const struct in_ifaddr *ifa;
 
 	if (!in_dev)
 		return htonl(INADDR_ANY);
 
-	for_ifa(in_dev) {
+	in_dev_for_each_ifa_rcu(ifa, in_dev) {
 		if (fl4->saddr == ifa->ifa_local)
 			return fl4->saddr;
-	} endfor_ifa(in_dev);
+	}
 
 	return htonl(INADDR_ANY);
 }