From nobody Thu Sep 19 20:21:16 2024 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 4X8n3J74D5z5XL3g; Thu, 19 Sep 2024 20:21:16 +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 4X8n3J51XDz4Ww5; Thu, 19 Sep 2024 20:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726777276; 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=HNQXiS3M2Xq1v79KG9osqWa6xDglx1TSEMelDFbEjKA=; b=YvYid3ffTL6FxqNCPKE020HSHWAh22URrJtlOUjwhLe7p74JYwxhSEpkdU5GDDAs5EaZrk aujpBNcWm/5Kw7aTLq6vNocizSx9D+Ij9cI8il2Xkipd07r+tSLv9pmxj/KkfIbTjNYxpK twFO+ahiYQi3AaTiSfz15imuUGPx34JezRWfW4oeAcFIVHLXJNH/sJrlvuKxZCN59Ywbs0 O7bKLfTBBgGIag4qVHxIxR7EiGllgzvOkMps41bUaOyJ9AQ7/CB/Ykd1en4e1sgJQMDbvm bO8q9avPZp6CidayLmurQyS3jFzJp5DjNRLIdxtSPZVfZxojJtibSL0Z2y6hBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726777276; a=rsa-sha256; cv=none; b=xGNwMw0/JWaA1qb+7EGSRV+XWueX7/y4MyYMwjoHX8crQ5YA+Unbl8FNZvIJ2eKuHJFJDr F9RR+jv4zpnK01S8XWivuX3SkgPq4V+AaUKYGjam/VX7oDnK3JzkMEmk8eo+ugg9UD3ggh a3MxZDYsUgqkRuWuDS6FHBH6+++R/EU9aKJqOvI72sPItzoW8SBTGc61Fk4AAAZZYErxBr ZIzWa7aLg7ctTdcw/a8uuFiCB2VB0PbswGYhuMK9v+TqwlJH/xGfjTG24bsEVSyR8Ua4v+ TLU8SQpc132F63btb3rBNxQG6G/qhlMwOmjj1pAwhQmWLZaQyD2X0MwazYjOKw== 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=1726777276; 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=HNQXiS3M2Xq1v79KG9osqWa6xDglx1TSEMelDFbEjKA=; b=FcodCu89Jhj3wQWNUKBQ+eCRJXmcV1e8fA+BUfLpb8H4uCRMltwhiJrqRsNF1IHS66xOqA UdJF53TdaYsPaRTVyBbv+JAB9xqjHBueIN6Ms+T9+wJuQ/beVGWnp6WFwb0AuAc3oph1F6 LFgUeDpoVtbVS5UjBhnOZNJW4zyIFzAjSJTF/XeWVa1107btwiLCSK38kp8uMRxC0NwBs8 84aAkxkAZZvSrrMSfu2GAk7kSeEypOAlZ/NcJ+ZmikC68xaiiYY4asPAKniIykpB0lQ+ta VzHniglBRV2kzQw2DvFKaJd1MTDTbAVpEJKRfgeHI94xSZO/MUtGA2FpArL+Dg== 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 4X8n3J4bQzzKvG; Thu, 19 Sep 2024 20:21:16 +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 48JKLG6c046311; Thu, 19 Sep 2024 20:21:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JKLGIA046308; Thu, 19 Sep 2024 20:21:16 GMT (envelope-from git) Date: Thu, 19 Sep 2024 20:21:16 GMT Message-Id: <202409192021.48JKLGIA046308@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: 650dcb48b06f - main - pf: print rule number in debug output 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 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: 650dcb48b06fc517abe15f4794a54a6d96ebceb4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=650dcb48b06fc517abe15f4794a54a6d96ebceb4 commit 650dcb48b06fc517abe15f4794a54a6d96ebceb4 Author: Kristof Provost AuthorDate: 2024-08-29 12:03:49 +0000 Commit: Kristof Provost CommitDate: 2024-09-19 20:20:12 +0000 pf: print rule number in debug output When printing states in debug output, print the rule number that created it if we have it. Requested by dlg, ok henning. Obtained from: OpenBSD, mcbride , c06d1661a6 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46585 --- sys/netpfil/pf/pf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 0484a7ee5056..58bcd1f2ee71 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -2889,6 +2889,8 @@ pf_print_state_parts(struct pf_kstate *s, printf("]"); } printf(" %u:%u", s->src.state, s->dst.state); + if (s->rule.ptr) + printf(" @%d", s->rule.ptr->nr); } }