From nobody Thu Oct 01 10:33:17 2026 X-Original-To: dev-commits-src-main@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 4hwStQ2Sz3z6vS2h for ; Thu, 01 Oct 2026 10:33:18 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hwStQ0Fdcz4tlZ for ; Thu, 01 Oct 2026 10:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790850798; 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=ldfKqulO6MxiBOe5N6ye2TSVwpQM61PE1zfx8c15GHo=; b=QSmO5ARXUotGISZ6Q2D+2VHOIhZbfMVWG/sZUk8DxeCckcq7cfP6p8+9GffhVCHhRZ4Yxi sLZuqc+nAbwsVuoMPw4PEsRN9/bt1FsK+oP5Cvrk+HjCD5P4JmfsaQep0lW+MSS8MMIoNy zYSYxiZfqagWOHxUu5Yd01E1MGM/Mj7ohKvauqMxFTbVQM3dGHMxqur4fi7usb0rGdi2Wl Juh3MEmXLuxBdd9/bEePfSGYXD29s4DN/s+8BMD7rm30I44Xi0ptCf9j/QiZPNqYT9ZgLi rUw9Dsel9n8X9u0LArhboPPH7Yh/PqmVQFpsn3WBHMJi6BevErBYNnSJtqyPaA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790850798; b=jPr88BLih+UzR6KV6xpas6G2kmGQKxCO1kIV0SgLxc7w5xISEYeJ/pSdlLcs7eqEiK5btC 9LCMpqR5FD01kbZ1tRJg+crRPCzE3lhH2g+1Ris7/04DxuJGVIMrfN9EUyhj1V1NcnBheE yZtEjOAgKb7TcVIokPdikZCZSOf7VAXZeQ7u7t0Xodsn4QinDDq03xm3WgM0aQSh7jFFeW YB/3NB3Fu+G8B036UJeANbK3AnXWsw6XAH6y/PX00Bvihhhj88LgfRqfi3TAjvcBF1J0gq c6AMgCTK2G3RwgA4RVtIyDL6nmUfZr0cVHogaXS4zzL5c4h96h8NJVEtsOLsKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790850798; 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=ldfKqulO6MxiBOe5N6ye2TSVwpQM61PE1zfx8c15GHo=; b=ervU3O29fmgXZgCY9cczBNVuu/iWKDQft4rzo3hfQjNIkLhdn5OnN4CSyM5KBdGp+5ZfSY XgZlJO1sYJelWNmWUg8pEq/2QA27BwFKJKFUjax8vp3eKNMGrMDqrvocVu8/IVapsxmDCs qkIek7RGCnStdHpdAqhbYUzEfMUEehcQPNUbm4Chkz4nUZUAHiiHIxzmwa52XDvXIL1Ls1 HHm2SBnuskFuwhFE/+Ci+GYK0DYbcJfZZZPkv/aCarHy3CLiHP67KLsfyfzZqlnxIpnjdw 2GvTyS91b5ai7SjVJAVbjEv7pmcKkUg3193zcdjWje/p2lIrhdqR3pFuKQ93Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hwStP6Q4qzS9C for ; Thu, 01 Oct 2026 10:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c2a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 01 Oct 2026 10:33:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: R. Christian McDonald Subject: git: 2fa4ef491608 - main - pf: free the packet rate counter of a rule List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fa4ef491608aad827f8ceef3eb389d8c07451fb Auto-Submitted: auto-generated Date: Thu, 01 Oct 2026 10:33:17 +0000 Message-Id: <6abe36ed.3c2a0.7867c3d2@gitrepo.freebsd.org> The branch main has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=2fa4ef491608aad827f8ceef3eb389d8c07451fb commit 2fa4ef491608aad827f8ceef3eb389d8c07451fb Author: R. Christian McDonald AuthorDate: 2026-10-01 10:32:32 +0000 Commit: R. Christian McDonald CommitDate: 2026-10-01 10:32:32 +0000 pf: free the packet rate counter of a rule pf_ioctl_addrule() allocates a counter_rate for every rule, whether it has a max-pkt-rate or not, and pf_krule_free() never frees it. Free it with the rest of the rule. Reviewed by: kp Approved by: kp (mentor) Fixes: ff11f1c8c76c ("pf: add a generic packet rate matching filter") MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D60190 --- sys/netpfil/pf/pf_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index ab2140a60ce7..76cc6074cd8c 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2758,6 +2758,7 @@ pf_krule_free(struct pf_krule *rule) counter_u64_free(rule->states_tot); for (pf_sn_types_t sn_type=0; sn_typesrc_nodes[sn_type]); + counter_rate_free(rule->pktrate.cr); uma_zfree_pcpu(pf_timestamp_pcpu_zone, rule->timestamp); mtx_destroy(&rule->nat.mtx);