Fix duplicate acquiring of refcount when joining IPv6 multicast groups.

This was observed by starting and stopping rpcbind(8) multiple times.

PR:			233535
Differential Revision:	https://reviews.freebsd.org/D18887
Reviewed by:		bz (net)
Tested by:		ae
MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2019-01-24 08:15:41 +00:00
parent 95ad3a2dca
commit 130f575d07

View File

@ -2178,7 +2178,10 @@ in6p_join_group(struct inpcb *inp, struct sockopt *sopt)
IN6_MULTI_UNLOCK();
goto out_im6o_free;
}
in6m_acquire(inm);
/*
* NOTE: Refcount from in6_joingroup_locked()
* is protecting membership.
*/
imo->im6o_membership[idx] = inm;
} else {
CTR1(KTR_MLD, "%s: merge inm state", __func__);