mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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")
This commit is contained in:
parent
2514ac810d
commit
81dc007a00
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue