Date: Thu, 25 Apr 2019 03:47:32 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346659 - in stable/11/sys: netinet netinet6 Message-ID: <201904250347.x3P3lWTe006620@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Apr 25 03:47:32 2019 New Revision: 346659 URL: https://svnweb.freebsd.org/changeset/base/346659 Log: MFC r346118: Reinitialize multicast source filter structures after invalidation. Modified: stable/11/sys/netinet/in_mcast.c stable/11/sys/netinet6/in6_mcast.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/in_mcast.c ============================================================================== --- stable/11/sys/netinet/in_mcast.c Thu Apr 25 03:46:54 2019 (r346658) +++ stable/11/sys/netinet/in_mcast.c Thu Apr 25 03:47:32 2019 (r346659) @@ -2428,10 +2428,14 @@ out_in_multi_locked: if (is_final) { /* Remove the gap in the membership and filter array. */ + KASSERT(RB_EMPTY(&imf->imf_sources), + ("%s: imf_sources not empty", __func__)); 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_membership[idx - 1] = imo->imo_membership[idx]; + imo->imo_mfilters[idx - 1] = imo->imo_mfilters[idx]; } + imf_init(&imo->imo_mfilters[idx - 1], MCAST_UNDEFINED, + MCAST_EXCLUDE); imo->imo_num_memberships--; } Modified: stable/11/sys/netinet6/in6_mcast.c ============================================================================== --- stable/11/sys/netinet6/in6_mcast.c Thu Apr 25 03:46:54 2019 (r346658) +++ stable/11/sys/netinet6/in6_mcast.c Thu Apr 25 03:47:32 2019 (r346659) @@ -2310,10 +2310,14 @@ in6p_leave_group(struct inpcb *inp, struct sockopt *so if (is_final) { /* Remove the gap in the membership array. */ + KASSERT(RB_EMPTY(&imf->im6f_sources), + ("%s: im6f_sources not empty", __func__)); for (++idx; idx < imo->im6o_num_memberships; ++idx) { - imo->im6o_membership[idx-1] = imo->im6o_membership[idx]; - imo->im6o_mfilters[idx-1] = imo->im6o_mfilters[idx]; + imo->im6o_membership[idx - 1] = imo->im6o_membership[idx]; + imo->im6o_mfilters[idx - 1] = imo->im6o_mfilters[idx]; } + im6f_init(&imo->im6o_mfilters[idx - 1], MCAST_UNDEFINED, + MCAST_EXCLUDE); imo->im6o_num_memberships--; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904250347.x3P3lWTe006620>