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:
parent
67e89408e5
commit
cc5776b24d
@ -2278,9 +2278,11 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sopt)
|
|||||||
imf_reap(imf);
|
imf_reap(imf);
|
||||||
|
|
||||||
if (is_final) {
|
if (is_final) {
|
||||||
/* Remove the gap in the membership array. */
|
/* Remove the gap in the membership and filter array. */
|
||||||
for (++idx; idx < imo->imo_num_memberships; ++idx)
|
for (++idx; idx < imo->imo_num_memberships; ++idx) {
|
||||||
imo->imo_membership[idx-1] = imo->imo_membership[idx];
|
imo->imo_membership[idx-1] = imo->imo_membership[idx];
|
||||||
|
imo->imo_mfilters[idx-1] = imo->imo_mfilters[idx];
|
||||||
|
}
|
||||||
imo->imo_num_memberships--;
|
imo->imo_num_memberships--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user