mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
ipv6: mcast: reduce ipv6_chk_mcast_addr() indentation
Add a label and two gotos to shorten lines by two tabulations, to ease code review of following patches. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20241210183352.86530-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
91a91aacc5
commit
d51cfd5f4f
@ -1021,29 +1021,31 @@ bool ipv6_chk_mcast_addr(struct net_device *dev, const struct in6_addr *group,
|
|||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
idev = __in6_dev_get(dev);
|
idev = __in6_dev_get(dev);
|
||||||
if (idev) {
|
if (!idev)
|
||||||
for_each_mc_rcu(idev, mc) {
|
goto unlock;
|
||||||
if (ipv6_addr_equal(&mc->mca_addr, group))
|
for_each_mc_rcu(idev, mc) {
|
||||||
|
if (ipv6_addr_equal(&mc->mca_addr, group))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!mc)
|
||||||
|
goto unlock;
|
||||||
|
if (src_addr && !ipv6_addr_any(src_addr)) {
|
||||||
|
struct ip6_sf_list *psf;
|
||||||
|
|
||||||
|
for_each_psf_rcu(mc, psf) {
|
||||||
|
if (ipv6_addr_equal(&psf->sf_addr, src_addr))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (mc) {
|
if (psf)
|
||||||
if (src_addr && !ipv6_addr_any(src_addr)) {
|
rv = psf->sf_count[MCAST_INCLUDE] ||
|
||||||
struct ip6_sf_list *psf;
|
psf->sf_count[MCAST_EXCLUDE] !=
|
||||||
|
mc->mca_sfcount[MCAST_EXCLUDE];
|
||||||
for_each_psf_rcu(mc, psf) {
|
else
|
||||||
if (ipv6_addr_equal(&psf->sf_addr, src_addr))
|
rv = mc->mca_sfcount[MCAST_EXCLUDE] != 0;
|
||||||
break;
|
} else {
|
||||||
}
|
rv = true; /* don't filter unspecified source */
|
||||||
if (psf)
|
|
||||||
rv = psf->sf_count[MCAST_INCLUDE] ||
|
|
||||||
psf->sf_count[MCAST_EXCLUDE] !=
|
|
||||||
mc->mca_sfcount[MCAST_EXCLUDE];
|
|
||||||
else
|
|
||||||
rv = mc->mca_sfcount[MCAST_EXCLUDE] != 0;
|
|
||||||
} else
|
|
||||||
rv = true; /* don't filter unspecified source */
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
unlock:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user