Fix an obvious logic error in the IPv4 multicast leave processing,

where the filter mode vector was not updated correctly after the leave.

PR:		138691
Submitted by:	Stef Walter
MFC after:	5 days
This commit is contained in:
Bruce M Simpson 2009-09-12 19:07:03 +00:00
parent 67e89408e5
commit cc5776b24d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197130

View File

@ -2278,9 +2278,11 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sopt)
imf_reap(imf);
if (is_final) {
/* Remove the gap in the membership array. */
for (++idx; idx < imo->imo_num_memberships; ++idx)
/* Remove the gap in the membership and filter array. */
for (++idx; idx < imo->imo_num_memberships; ++idx) {
imo->imo_membership[idx-1] = imo->imo_membership[idx];
imo->imo_mfilters[idx-1] = imo->imo_mfilters[idx];
}
imo->imo_num_memberships--;
}