From nobody Thu Oct 01 10:35:23 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 4hwSwr1Gdlz6vSQF for ; Thu, 01 Oct 2026 10:35:24 +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 4hwSwq5dX0z4vf9 for ; Thu, 01 Oct 2026 10:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790850923; 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=tHJj83/ff1uRmEmTBqz793xl8DCxFADRI9iKURWdG7g=; b=hZ6kbGT/siNFvM2gFSqU3zZ+1GMVYayNaa6PaV2fmPM0+bLVNi6udjDjvbQ6W00ZofemqA yf1sLL/8w2dfA1+E6Iwgdzy4i6ugLE7jSASM5Vlc8ulx1kbj5Ro7X6UsS34UZfpJbttGhe u4uiXTayd3No28moknnrDZzO3m4PUNg35gxOa+vhd5dWTbMUXGLs0R+BUdK5GnauT6Cmw+ jKlZJFHsr9RZ95FVJH373HkKk2D0/hLEv+mh1/jp8EDJ3j38aQd8yoXBasUudmS8BTVGq+ CNyAkC5dUIAh+pKXpJ0z1yKFiqTAMVI7Sxl+XpCEBqvVSJdEe0ldVTDr2GHOQQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790850923; b=VfUo/Y5W2yhoPsmLjVGoppUNobOTiTY3lsrLQyl4zSAp/qKl+Yqp7olQVkb1BDXYrylD81 X8hNJUwPQBPG1er4eq3axM3OyRzCfi8JWyMbs7yhUoOTLYhrTSjFxjfMjPBbJiDxHcVKcJ RTnEjCYnGVA8AEasmUFiSaSKJgSij/SpDFcrcbBwomSvGx1j3yb4khbqEFI7mOD5OC9DTM /kA3yBdtMmMGt/8s5nMyoaEHnLpEb+xZrCNKdFZqvKV3omwgzAWtUZXC2TV9xiUltXmxob M/q0+OzyDKq0xrFvuX8FDX3O74tdmQduTDWCI1s3qNseYvpRdjF0lGsKpgpOQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790850923; 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=tHJj83/ff1uRmEmTBqz793xl8DCxFADRI9iKURWdG7g=; b=qxJyTxMkLrqcVLYgPMkbErB/SnA9Qi0w0lB/wTNRBaerz+MD5/sba+mMQICqZ3ikft51Qu inM9Iagv6ZL5FI0J+v9FwGhMMhCYvezr3UwheWgwAu/UfOC7a7FjQ/inS/YOUEZHiwRqH8 0VF5QGGCSACZmzvfKgMueVD4GxWDxaT60iVB6UScEAefzuOQY1pgGubpNZrcZAiLKNZvJy 7bmK2OkeWr6Pr1W0Aa5oR4uIN3DiiC+CRTWxM2KkQABuE37EOKiTHiKPlC+9bZXt/xMNsT cksr6l6vTHwZyoczEQJvS9tQZhXG6yYPtYnEisM/4pesPyjJe1pu5iT9PXdjMg== 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 4hwSwq4RWQzRvj for ; Thu, 01 Oct 2026 10:35:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cb4d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 01 Oct 2026 10:35:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: R. Christian McDonald Subject: git: 5c13a82de8be - main - pf: remove a source limiter from the id tree if its name is taken 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: 5c13a82de8be51c8472e922a667519d575dcb59e Auto-Submitted: auto-generated Date: Thu, 01 Oct 2026 10:35:23 +0000 Message-Id: <6abe376b.3cb4d.7fcaedf@gitrepo.freebsd.org> The branch main has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=5c13a82de8be51c8472e922a667519d575dcb59e commit 5c13a82de8be51c8472e922a667519d575dcb59e Author: R. Christian McDonald AuthorDate: 2026-10-01 10:34:50 +0000 Commit: R. Christian McDonald CommitDate: 2026-10-01 10:34:50 +0000 pf: remove a source limiter from the id tree if its name is taken When pf_sourcelim_add() finds the name of the new limiter taken, it undoes the insertion into the id tree with RB_REMOVE() on the name tree, which the limiter is not in, and then frees the limiter. The freed limiter stays in the inactive id tree, and RB_REMOVE() of an element with no links clears the root of the name tree, which loses every other inactive limiter from it. pf_statelim_add() gets this right. parse.y refuses duplicate names, so pfctl does not get here, but any netlink client can. Reviewed by: kp Approved by: kp (mentor) Fixes: 461648121230 ("pf: introduce source and state limiters") Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D60189 --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 76cc6074cd8c..095d357b5ef5 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2237,7 +2237,7 @@ pf_sourcelim_add(const struct pfioc_sourcelim *ioc) if (RB_INSERT(pf_sourcelim_nm_tree, &V_pf_sourcelim_nm_tree_inactive, pfsrlim) != NULL) { - RB_REMOVE(pf_sourcelim_nm_tree, &V_pf_sourcelim_nm_tree_inactive, + RB_REMOVE(pf_sourcelim_id_tree, &V_pf_sourcelim_id_tree_inactive, pfsrlim); error = EBUSY; goto unlock;