Date: Fri, 24 Dec 2021 10:24:15 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260406] pfctl: Cannot allocate memory (after a time) Message-ID: <bug-260406-227-TRPvjPpu8K@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-260406-227@https.bugs.freebsd.org/bugzilla/> References: <bug-260406-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260406 --- Comment #35 from Kristof Provost <kp@freebsd.org> --- (In reply to Andriy Gapon from comment #31) This should prevent the table limit from being set, so it's a little narrow= er than just disabling the limit for everything: diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c index 4cfe5d61e83e..859d5ad79775 100644 --- a/sys/netpfil/pf/pf_table.c +++ b/sys/netpfil/pf/pf_table.c @@ -209,7 +209,6 @@ pfr_initialize(void) V_pfr_kentry_z =3D uma_zcreate("pf table entries", sizeof(struct pfr_kentry), NULL, NULL, NULL, NULL, UMA_ALIGN_PT= R, 0); - V_pf_limits[PF_LIMIT_TABLE_ENTRIES].zone =3D V_pfr_kentry_z; V_pf_limits[PF_LIMIT_TABLE_ENTRIES].limit =3D PFR_KENTRY_HIWAT; } diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index a0eec1b09289..22c689934c2d 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1918,6 +1918,9 @@ pfctl_load_limit(struct pfctl *pf, unsigned int index, unsigned int limit) { struct pfioc_limit pl; + if (index =3D=3D PF_LIMIT_TABLE_ENTRIES) + return (0); + memset(&pl, 0, sizeof(pl)); pl.index =3D index; pl.limit =3D limit; --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260406-227-TRPvjPpu8K>