summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_mcast.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/in6_mcast.c')
-rw-r--r--sys/netinet6/in6_mcast.c65
1 files changed, 29 insertions, 36 deletions
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index ff72fa6..d6ec0b3 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -1449,16 +1449,15 @@ in6p_block_unblock_source(struct inpcb *inp, struct sockopt *sopt)
CTR1(KTR_MLD, "%s: merge inm state", __func__);
error = in6m_merge(inm, imf);
- if (error) {
+ if (error)
CTR1(KTR_MLD, "%s: failed to merge inm state", __func__);
- goto out_im6f_rollback;
+ else {
+ CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
+ error = mld_change_state(inm, 0);
+ if (error)
+ CTR1(KTR_MLD, "%s: failed mld downcall", __func__);
}
- CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
- error = mld_change_state(inm, 0);
- if (error)
- CTR1(KTR_MLD, "%s: failed mld downcall", __func__);
-
IN6_MULTI_UNLOCK();
out_im6f_rollback:
@@ -2046,29 +2045,27 @@ in6p_join_group(struct inpcb *inp, struct sockopt *sopt)
if (is_new) {
error = in6_mc_join_locked(ifp, &gsa->sin6.sin6_addr, imf,
&inm, 0);
- if (error)
+ if (error) {
+ IN6_MULTI_UNLOCK();
goto out_im6o_free;
+ }
imo->im6o_membership[idx] = inm;
} else {
CTR1(KTR_MLD, "%s: merge inm state", __func__);
error = in6m_merge(inm, imf);
- if (error) {
+ if (error)
CTR1(KTR_MLD, "%s: failed to merge inm state",
__func__);
- goto out_im6f_rollback;
- }
- CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
- error = mld_change_state(inm, 0);
- if (error) {
- CTR1(KTR_MLD, "%s: failed mld downcall",
- __func__);
- goto out_im6f_rollback;
+ else {
+ CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
+ error = mld_change_state(inm, 0);
+ if (error)
+ CTR1(KTR_MLD, "%s: failed mld downcall",
+ __func__);
}
}
IN6_MULTI_UNLOCK();
-
-out_im6f_rollback:
INP_WLOCK_ASSERT(inp);
if (error) {
im6f_rollback(imf);
@@ -2295,23 +2292,20 @@ in6p_leave_group(struct inpcb *inp, struct sockopt *sopt)
} else {
CTR1(KTR_MLD, "%s: merge inm state", __func__);
error = in6m_merge(inm, imf);
- if (error) {
+ if (error)
CTR1(KTR_MLD, "%s: failed to merge inm state",
__func__);
- goto out_im6f_rollback;
- }
-
- CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
- error = mld_change_state(inm, 0);
- if (error) {
- CTR1(KTR_MLD, "%s: failed mld downcall",
- __func__);
+ else {
+ CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
+ error = mld_change_state(inm, 0);
+ if (error)
+ CTR1(KTR_MLD, "%s: failed mld downcall",
+ __func__);
}
}
IN6_MULTI_UNLOCK();
-out_im6f_rollback:
if (error)
im6f_rollback(imf);
else
@@ -2520,16 +2514,15 @@ in6p_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
*/
CTR1(KTR_MLD, "%s: merge inm state", __func__);
error = in6m_merge(inm, imf);
- if (error) {
+ if (error)
CTR1(KTR_MLD, "%s: failed to merge inm state", __func__);
- goto out_im6f_rollback;
+ else {
+ CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
+ error = mld_change_state(inm, 0);
+ if (error)
+ CTR1(KTR_MLD, "%s: failed mld downcall", __func__);
}
- CTR1(KTR_MLD, "%s: doing mld downcall", __func__);
- error = mld_change_state(inm, 0);
- if (error)
- CTR1(KTR_MLD, "%s: failed mld downcall", __func__);
-
IN6_MULTI_UNLOCK();
out_im6f_rollback:
OpenPOWER on IntegriCloud