From nobody Fri Dec 24 10:24:15 2021 X-Original-To: bugs@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 6D72E1915B9D for ; Fri, 24 Dec 2021 10:24:16 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JL3801WBWz4t7y for ; Fri, 24 Dec 2021 10:24:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 10B0F222E8 for ; Fri, 24 Dec 2021 10:24:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1BOAOG2q045127 for ; Fri, 24 Dec 2021 10:24:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1BOAOGm7045126 for bugs@FreeBSD.org; Fri, 24 Dec 2021 10:24:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260406] pfctl: Cannot allocate memory (after a time) Date: Fri, 24 Dec 2021 10:24:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: kp@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640341456; 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: in-reply-to:in-reply-to:references:references; bh=70znwknbBrvc/Re2Hon7bn29qA6cUILL5i6xHda+/Nw=; b=dWpTnOXcbN9NMHYSBS0ywvehFKLKA64k9FRvcLXOZveZtQDk/80kvLuoNit9MzebfqmPwg 5Ns5E1t7YFGOFUtR/ynrwWUSKYE8frpJjFQW9fVNiZo6/nPD40hXLczC1GDphl03iwUmLv Z7QsziYPNBsGWQp5eL8VDENBNTRFDr0W43KhHXhHYL32XQgnXVNnLpS9Xw5FRQD/eu87aY 5avgIzSkaHuEP0VYdL40bJym228TfAEGKWk5rn51QeB0rbJLj8C4rsaambneFN4sT58a61 sneYXp/aQMvfSmRjS0gvqa3mhPv655A5fsogdPvtq0c7ByXHER4SDJJr0bIuMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640341456; a=rsa-sha256; cv=none; b=K0WhjaTpbh+H05n7Ylj49f1b+gweW9/1b1uIWohL8j+5CBya/MR3eHyBAxTa7CM7Vmt1SV KC5IEkSAbH3FLr3OSUMBa+xt+6f39LMTFTg+n139UU8leL9aC0pp29ML1b4RuR18+zSvai LxsfahQ0ESj1fZuEzMO9UL/elUuyMaDuHi0U98nOB/6Uo99hfIzToam9Eqwl6v7T1zCuZn fQ3ZLnnlr4dartuSteuWwnPcT4nowRrEzEBTldmwrIPoMIAYkiLa3nVK4uTXXUZglrxqVy GCkawaZzCUHQ+66VArZzhrmgMGJxCubddQdcIPhfPJU+8amDWsq+YNAGf5eK1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260406 --- Comment #35 from Kristof Provost --- (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.=