From cc5776b24dc22fded65cb6ca4b04f0df502af386 Mon Sep 17 00:00:00 2001 From: Bruce M Simpson Date: Sat, 12 Sep 2009 19:07:03 +0000 Subject: [PATCH] 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 --- sys/netinet/in_mcast.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index b0e03f860042..03b0a9598629 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -2278,9 +2278,11 @@ out_imf_rollback: 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--; }