From nobody Mon Aug 26 15:51:54 2024 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 4WswCZ6g0hz5T8Gg; Mon, 26 Aug 2024 15:51:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WswCZ5Mkhz4sFs; Mon, 26 Aug 2024 15:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724687514; 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=M9M6Eq3JFMA6qXZpD45gQxgLHXammxIsjqAkDAWRtMo=; b=yjl/cCvQV5CusTwUwUcQnyKuqk/+eI4vgvCOzTaqaLRat5zL1ohXot/XQ1mZk7isvH6a38 3+YSBIdw015jtmUoJYOdKxHSULimAHWIHHiUgbSgEa8blq9/CXi2z/s+71AJSCc/o70Xss A1v5DFdNlknsfu2gR51/2ElnP3OXJMKfOEnqmCM0+zhd8TxbVIwBde1OaCUDm2hvlfOA/6 sJhPdNNAm3FFucFdlsNnpxgt3499NfTQqNwT1fZlecbqK6sTkGABY4KJEKTYBYBY8UyDxM BIYs1ZF9GSZTEwysKvNdEdZBybZqj80mUrExjmBjwOU5d+xcWUgGynZceNQbcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724687514; a=rsa-sha256; cv=none; b=ZdxNO7nBI7GTWObgu/gjec96U3hnxCXz2j9VvkHPfVsdEwSo9qrQTfolzBnNEj7Yglrqmg T4dZH4pMFLRTI65FTl4U7mM8YIn5cuTm2XFnfJmou5x3ImZy6kNgepA3MljAjZTV4Wsd8C dhpAPGlxjsAk5T4VfsBen2Wuz95GFtck00HAYrKMwqCqqqMXPqzg45+qsxJ5rdWdhj0sVE 7IS3cRFuorr0pYDQ/d1wdv6ff7y45vwhah1oK68QvqEr5pI1OpY4RjEsPaq4c+zDdet9zO icHhsCakl9YhTxCJuhPNLsXz0gTmXTywJR4WMYW+w05/xQjWcVgcL5ghWysQ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724687514; 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=M9M6Eq3JFMA6qXZpD45gQxgLHXammxIsjqAkDAWRtMo=; b=p2GfPSoNE9I/JMPF2EwFFSDFFCPNMWU+6J4SnX/Q+zPXC3dV4PCxtw91VC3C284gD4ZxBO E5lzHuZTpBdrKOcWfnQI5hD3esRbjdVEcG5iXEBkAn3Kw3gKEUwJ4C1VEKcQoCcnPvUKqu MNwPs9RKUUjo6Ps+qX/SKp55OROSKdN4iFCB1vpcuFXZeDwbCK2z82z68pJueZ6F2OnLG/ AGVjQeCn8j4FNqsli8r7qxRTd1p+05MHiFCSbXkw/JQRLQrLuFjaxEhCOWwdmi/SmeiYC5 Af2zgcLfJjue42KwbT8GEfDGOx8xDyXYk0NtQAw5sV9t+5OIVtsWFHtP2k1Hng== 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 4WswCZ50Krz1CX4; Mon, 26 Aug 2024 15:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47QFpsJX015437; Mon, 26 Aug 2024 15:51:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47QFpseU015434; Mon, 26 Aug 2024 15:51:54 GMT (envelope-from git) Date: Mon, 26 Aug 2024 15:51:54 GMT Message-Id: <202408261551.47QFpseU015434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 88e1bc06692a - stable/14 - mcast: fix leaked igmp packets on multicast cleanup 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 88e1bc06692ae4552462945c53b5047e8dad5929 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=88e1bc06692ae4552462945c53b5047e8dad5929 commit 88e1bc06692ae4552462945c53b5047e8dad5929 Author: Kristof Provost AuthorDate: 2023-12-13 12:32:08 +0000 Commit: Warner Losh CommitDate: 2024-08-26 15:46:21 +0000 mcast: fix leaked igmp packets on multicast cleanup When we release a multicast address (e.g. on interface shutdown) we may still have packets queued in inm_scq. We have to free those, or we'll leak memory. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43033 (cherry picked from commit c2e340452c147b551180f2a1600ae76491342b0e) --- sys/netinet/in_mcast.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index f93c4b0dac8c..3dc4fa271683 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -1181,6 +1181,7 @@ inm_purge(struct in_multi *inm) free(ims, M_IPMSOURCE); inm->inm_nsrc--; } + mbufq_drain(&inm->inm_scq); } /*