Index: head/sys/netinet/in_mcast.c =================================================================== --- head/sys/netinet/in_mcast.c +++ head/sys/netinet/in_mcast.c @@ -2211,7 +2211,11 @@ __func__); goto out_inp_locked; } - inm_acquire(imf->imf_inm); + /* + * NOTE: Refcount from in_joingroup_locked() + * is protecting membership. + */ + ip_mfilter_insert(&imo->imo_head, imf); } else { CTR1(KTR_IGMPV3, "%s: merge inm state", __func__); IN_MULTI_LIST_LOCK(); @@ -2235,8 +2239,6 @@ goto out_inp_locked; } } - if (is_new) - ip_mfilter_insert(&imo->imo_head, imf); imf_commit(imf); imf = NULL; Index: head/sys/netinet6/in6_mcast.c =================================================================== --- head/sys/netinet6/in6_mcast.c +++ head/sys/netinet6/in6_mcast.c @@ -2111,6 +2111,7 @@ * NOTE: Refcount from in6_joingroup_locked() * is protecting membership. */ + ip6_mfilter_insert(&imo->im6o_head, imf); } else { CTR1(KTR_MLD, "%s: merge inm state", __func__); IN6_MULTI_LIST_LOCK(); @@ -2135,9 +2136,6 @@ goto out_in6p_locked; } } - - if (is_new) - ip6_mfilter_insert(&imo->im6o_head, imf); im6f_commit(imf); imf = NULL;