Date: Thu, 19 Sep 2024 20:21:16 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 650dcb48b06f - main - pf: print rule number in debug output Message-ID: <202409192021.48JKLGIA046308@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=650dcb48b06fc517abe15f4794a54a6d96ebceb4 commit 650dcb48b06fc517abe15f4794a54a6d96ebceb4 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2024-08-29 12:03:49 +0000 Commit: Kristof Provost <kp@FreeBSD.org> 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 <mcbride@openbsd.org>, 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); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409192021.48JKLGIA046308>