Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_mcast.c
Show First 20 Lines • Show All 2,105 Lines • ▼ Show 20 Lines | if (is_new) { | ||||
} | } | ||||
if (error) { | if (error) { | ||||
goto out_in6p_locked; | goto out_in6p_locked; | ||||
} | } | ||||
/* | /* | ||||
* NOTE: Refcount from in6_joingroup_locked() | * NOTE: Refcount from in6_joingroup_locked() | ||||
* is protecting membership. | * is protecting membership. | ||||
*/ | */ | ||||
ip6_mfilter_insert(&imo->im6o_head, imf); | |||||
} else { | } else { | ||||
CTR1(KTR_MLD, "%s: merge inm state", __func__); | CTR1(KTR_MLD, "%s: merge inm state", __func__); | ||||
IN6_MULTI_LIST_LOCK(); | IN6_MULTI_LIST_LOCK(); | ||||
error = in6m_merge(inm, imf); | error = in6m_merge(inm, imf); | ||||
if (error) { | if (error) { | ||||
CTR1(KTR_MLD, "%s: failed to merge inm state", | CTR1(KTR_MLD, "%s: failed to merge inm state", | ||||
__func__); | __func__); | ||||
IN6_MULTI_LIST_UNLOCK(); | IN6_MULTI_LIST_UNLOCK(); | ||||
im6f_rollback(imf); | im6f_rollback(imf); | ||||
im6f_reap(imf); | im6f_reap(imf); | ||||
goto out_in6p_locked; | goto out_in6p_locked; | ||||
} | } | ||||
CTR1(KTR_MLD, "%s: doing mld downcall", __func__); | CTR1(KTR_MLD, "%s: doing mld downcall", __func__); | ||||
error = mld_change_state(inm, 0); | error = mld_change_state(inm, 0); | ||||
IN6_MULTI_LIST_UNLOCK(); | IN6_MULTI_LIST_UNLOCK(); | ||||
if (error) { | if (error) { | ||||
CTR1(KTR_MLD, "%s: failed mld downcall", | CTR1(KTR_MLD, "%s: failed mld downcall", | ||||
__func__); | __func__); | ||||
im6f_rollback(imf); | im6f_rollback(imf); | ||||
im6f_reap(imf); | im6f_reap(imf); | ||||
goto out_in6p_locked; | goto out_in6p_locked; | ||||
} | } | ||||
} | } | ||||
if (is_new) | |||||
ip6_mfilter_insert(&imo->im6o_head, imf); | |||||
im6f_commit(imf); | im6f_commit(imf); | ||||
imf = NULL; | imf = NULL; | ||||
out_in6p_locked: | out_in6p_locked: | ||||
INP_WUNLOCK(inp); | INP_WUNLOCK(inp); | ||||
out_in6p_unlocked: | out_in6p_unlocked: | ||||
IN6_MULTI_UNLOCK(); | IN6_MULTI_UNLOCK(); | ||||
▲ Show 20 Lines • Show All 764 Lines • Show Last 20 Lines |