Date: Wed, 19 Feb 2025 10:41:43 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: 81dc007a00a9 - main - pfctl: improve warnings for limits Message-ID: <202502191041.51JAfhhw035507@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=81dc007a00a9d160653398afc80a58725747d24d commit 81dc007a00a9d160653398afc80a58725747d24d Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-02-12 16:41:18 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-02-19 10:41:10 +0000 pfctl: improve warnings for limits If pfctl cannot set a limit in the kernel, print the name of the limit and the requested value. OK henning@ Obtained from: OpenBSD, bluhm <bluhm@openbsd.org>, beb5ed50a7 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index e05c96a252fc..fd76a1926457 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2470,9 +2470,11 @@ pfctl_load_limit(struct pfctl *pf, unsigned int index, unsigned int limit) { if (pfctl_set_limit(pf->h, index, limit)) { if (errno == EBUSY) - warnx("Current pool size exceeds requested hard limit"); + warnx("Current pool size exceeds requested %s limit %u", + pf_limits[index].name, limit); else - warnx("cannot set '%s' limit", pf_limits[index].name); + warnx("Cannot set %s limit to %u", + pf_limits[index].name, limit); return (1); } return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502191041.51JAfhhw035507>