From nobody Thu Dec 14 22:00:01 2023 X-Original-To: dev-commits-src-all@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 4SrmVT3vZQz53qL6; Thu, 14 Dec 2023 22:00:01 +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 4SrmVT3LQ6z4scT; Thu, 14 Dec 2023 22:00:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702591201; 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=GTDXJG2Wlp1NAi70DuZUdtp/w4LXyVqY4mtI/XNVwmA=; b=kfYAsguNVSNZof1vLQU3AkodC8q9H0OOjVl+428D3b7lRrotNwRwPeuLMz9y5o6PKefTWb aaFxHCjQqkcrxQBivJPbrOnFe43vE3c5eQr5KxO41MhCwcmvuG8XinM+WcNZO/+iBnQmVU xh7aD4JG7BwTyrMAN1UcYk4DSmEIbWl3i+XSwEBTjiI4HdR9h9o6JEFRH26L1/pNh1CK1A 9HkSUpFuoOAaxtZQMcU9JWWrlNcUX7L3wIAU5JYoLEz7qvGI+1riAVTd+5opJ+Ht/GEI2n sK6Mr+1t8GhU1cuf8kH24jNug/9NeurH3ex6KdZ9J8KYoy+/l9Ae3aGhm+wV8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702591201; a=rsa-sha256; cv=none; b=Qq2zFIYNTOo52vv6Cy7jFZ+VZsqJMShUEtVHMCWn5SZlRpivjeaIGSxKbd9etbH/QIa91B JEIiHPA+6hdm8wgVJNHRNjEiCDHVr/xlx3qJB3Ksmhkddjkjb1Pf8HRYcVUvDG+ECamivl n9C4G2quzdL5LN1zQZ9kgN+rjIcFpc0/5lQ0G9VIwzGzzSP0IE10tbhPm5JhpC60UqT2kC yLY+EEY4nCHuHZIORrN6+WHDJf/b4enWC2yZX3vxK4aes6VPH0zUNuKVwpX0NYXYlHgvuE MqgC2QqjbRNgLvBIbVGTr028Gh+w8rnokBTO7FJOrCJpmeJE34k2RRT27Wg3iw== 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=1702591201; 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=GTDXJG2Wlp1NAi70DuZUdtp/w4LXyVqY4mtI/XNVwmA=; b=oqYPZDQRUN/pFnmASxrYkAAbNo0AQ9dusnMLcPhIw5nCA4/gG4UfDCbfX/fg8/gmjiSTu9 9deMv9XXGCiE4UusGg2KSTUV8krkMpWvPVP0X75B7QsFbtS4M7dYhhXeMCWU3NXlGbb+Dn GaHGW+cMn0klKASED/bTi6FGkC6wiodcH74ZxxiQbbZyXXxGMvRh/qiqXQF3c7QlDz4oGy eCRjSjAgmouLs+63WubXs6ik+1H6agG5looR/4/RJbYZAZiO3MW+jOt2xjM08n2pgvRtmX YaIj21jupe1AqWXOx14b9gQMLmrkbtDl133TN/QnwpESM6HUvP6aL2t7P2EN0g== 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 4SrmVT2SHmzlGH; Thu, 14 Dec 2023 22:00:01 +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 3BEM011F012684; Thu, 14 Dec 2023 22:00:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEM01gU012664; Thu, 14 Dec 2023 22:00:01 GMT (envelope-from git) Date: Thu, 14 Dec 2023 22:00:01 GMT Message-Id: <202312142200.3BEM01gU012664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c2e340452c14 - main - mcast: fix leaked igmp packets on multicast cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: c2e340452c147b551180f2a1600ae76491342b0e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c2e340452c147b551180f2a1600ae76491342b0e commit c2e340452c147b551180f2a1600ae76491342b0e Author: Kristof Provost AuthorDate: 2023-12-13 12:32:08 +0000 Commit: Kristof Provost CommitDate: 2023-12-14 21:06:01 +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 --- 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 cae15bc4108a..6d68ebcb188c 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -1180,6 +1180,7 @@ inm_purge(struct in_multi *inm) free(ims, M_IPMSOURCE); inm->inm_nsrc--; } + mbufq_drain(&inm->inm_scq); } /*