From nobody Mon Jul 31 12:45:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RDydw3y3Kz4q6Fw; Mon, 31 Jul 2023 12:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RDydm4sRlz40jF; Mon, 31 Jul 2023 12:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690807549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sk8RDu7Q/8Rz0xVhTNsUjL+03BGdNB2PO/WB1B9XlDw=; b=WTWWEO0elIRW156gBI9s1GF/chsOoAzwfsMBenqxZf3UW9Zle2ZDWl1Q9Z0C3qiOSZNNZM X1xdGOCNWBNMAJbN/TnjEQw9NxsmZcV1iYKjnRvExcc2CqxJNDzdSRlGkIIU0OiQss2eF0 asFzu1e+/8IsH9wYD1xkfvLzY+a6gdAeTY8j/Po7za8+Cq5t2yg9ajqLOcR5qRpkxsb4bP mqByutcA2z8+UODVGn8edRj0csZ4rOJkxaa//dJg2NzSM9qoeh8p5w0CPk+v5GhSSkjCqd S0/4p8SRFeFY9rbG4+B/UUrYTaJm0VKCUMsH/JQ94nAaX6xnolKAj0kGqqs1fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690807549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sk8RDu7Q/8Rz0xVhTNsUjL+03BGdNB2PO/WB1B9XlDw=; b=cMF5aFVDb3o8rtmft+Jy6TtqxYzWosAdqA/B742Vo4ThdxowrJxQSY4ERtcld/9tDZvsFh 0DLgQVd2tlvsnXQonO2xBqrHZJwq5W/X2OL8OIWFPDzoYRvnz7QRt9YCz2ImvydOaWfA9y cDjtce3jnczMtJ2TkpOnLhJ2d3ThBZphihs99sXn0dwJociSMDAOnlFNrsgSYPCvuW1VDn ACIB1EhP0JFEfxssomzTXSCqSyC4AGtw4x35swY3dHqlQodqLg6vhNOk6qa6xQo3hFJTv+ 7UtQhH8KHlI03jepMENiy/YyofH4StQ6LjJc64GYKPBo+ooah8lJ2pFdIf4G9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690807549; a=rsa-sha256; cv=none; b=YGr3yP8s6gCgt4bzuvDrFeIr59pdeFhKxre5hBL5/WRdGlMHuAI+fnWL5GWtmce7HRZDPu BPA7GIGYD//YymCmCdYCP1h7HEB9gcCweo08QZMLs8TVNz/0ezYQBW3+ytuND7AJfF/Mi3 9C4K3LnFHRf6rbsEr3xt2zcM0e7m0vDfxMSbQg09upGKYaZZEVCryDFRROPcp42PlnnsuT PzjvrDJ8Sjn7bAgn0oFUz6KxMRms9YNK+2f0iQcQO1SnItB+by0yQj5sUCDOgwCchwUXXB 3alFyd5UJtwIx6hKQpqFdZa10i4WLYbnrF3TzfaLkRTI7Nv7jrqFlQRlNm0/YQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RDydm1l0Hzwh9; Mon, 31 Jul 2023 12:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VCjlQC076569; Mon, 31 Jul 2023 12:45:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VCjldC076568; Mon, 31 Jul 2023 12:45:47 GMT (envelope-from git) Date: Mon, 31 Jul 2023 12:45:47 GMT Message-Id: <202307311245.36VCjldC076568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: abab84cfac60 - stable/13 - mld: always commit state changes on leaving List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: abab84cfac60e7e5a78d43cc4b0cfdd49f361989 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=abab84cfac60e7e5a78d43cc4b0cfdd49f361989 commit abab84cfac60e7e5a78d43cc4b0cfdd49f361989 Author: Kristof Provost AuthorDate: 2023-07-20 07:41:45 +0000 Commit: Kristof Provost CommitDate: 2023-07-31 12:43:14 +0000 mld: always commit state changes on leaving Resolve a race condition where we'd lose the Solicited-node multicast group subscription if we assigned the same IPv6 address twice. PR: 233683 Reviewed by: ae MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41124 (cherry picked from commit 9c9a76dc6873427b14f6c84397dd60ea8e529d8d) --- sys/netinet6/mld6.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 1c984db70e93..fffd37738244 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -2162,13 +2162,10 @@ static void mld_final_leave(struct in6_multi *inm, struct mld_ifsoftc *mli) { struct epoch_tracker et; - int syncstates; #ifdef KTR char ip6tbuf[INET6_ADDRSTRLEN]; #endif - syncstates = 1; - CTR4(KTR_MLD, "%s: final leave %s on ifp %p(%s)", __func__, ip6_sprintf(ip6tbuf, &inm->in6m_addr), inm->in6m_ifp, if_name(inm->in6m_ifp)); @@ -2232,7 +2229,6 @@ mld_final_leave(struct in6_multi *inm, struct mld_ifsoftc *mli) inm->in6m_state = MLD_LEAVING_MEMBER; inm->in6m_sctimer = 1; V_state_change_timers_running6 = 1; - syncstates = 0; } break; } @@ -2244,15 +2240,13 @@ mld_final_leave(struct in6_multi *inm, struct mld_ifsoftc *mli) break; } - if (syncstates) { - in6m_commit(inm); - CTR3(KTR_MLD, "%s: T1 -> T0 for %s/%s", __func__, - ip6_sprintf(ip6tbuf, &inm->in6m_addr), - if_name(inm->in6m_ifp)); - inm->in6m_st[1].iss_fmode = MCAST_UNDEFINED; - CTR3(KTR_MLD, "%s: T1 now MCAST_UNDEFINED for %p/%s", - __func__, &inm->in6m_addr, if_name(inm->in6m_ifp)); - } + in6m_commit(inm); + CTR3(KTR_MLD, "%s: T1 -> T0 for %s/%s", __func__, + ip6_sprintf(ip6tbuf, &inm->in6m_addr), + if_name(inm->in6m_ifp)); + inm->in6m_st[1].iss_fmode = MCAST_UNDEFINED; + CTR3(KTR_MLD, "%s: T1 now MCAST_UNDEFINED for %p/%s", + __func__, &inm->in6m_addr, if_name(inm->in6m_ifp)); } /*