FreeBSD Bugzilla – Attachment 230375 Details for
Bug 260406
pfctl: Cannot allocate memory (after a time)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
no table limit patch
pf_no_table_limit.patch (text/plain), 1.95 KB, created by
Kristof Provost
on 2021-12-24 14:51:09 UTC
(
hide
)
Description:
no table limit patch
Filename:
MIME Type:
Creator:
Kristof Provost
Created:
2021-12-24 14:51:09 UTC
Size:
1.95 KB
patch
obsolete
>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 == PF_LIMIT_TABLE_ENTRIES) >+ return (0); >+ > memset(&pl, 0, sizeof(pl)); > pl.index = index; > pl.limit = limit; >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 = uma_zcreate("pf table entries", > sizeof(struct pfr_kentry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, > 0); >- V_pf_limits[PF_LIMIT_TABLE_ENTRIES].zone = V_pfr_kentry_z; > V_pf_limits[PF_LIMIT_TABLE_ENTRIES].limit = PFR_KENTRY_HIWAT; > } > >diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh >index 267e70ebf0dc..f97e1d632c36 100755 >--- a/tests/sys/netinet/carp.sh >+++ b/tests/sys/netinet/carp.sh >@@ -195,9 +195,51 @@ negative_demotion_cleanup() > vnet_cleanup > } > >+atf_test_case "send_error" "cleanup" >+send_error_head() >+{ >+ atf_set descr 'Test PR #260499' >+ atf_set require.user root >+} >+ >+send_error_body() >+{ >+ carp_init >+ >+ epair=$(vnet_mkepair) >+ >+ vnet_mkjail one ${epair}a >+ jexec one ifconfig ${epair}a 192.0.2.1/24 up >+ jexec one ifconfig ${epair}a 192.0.2.254/24 alias vhid 1 >+ >+ ifconfig ${epair}b up >+ >+ sleep 3 >+ jexec one sysctl net.inet.carp.demotion >+ >+ # Enable pf >+ printf 'pass\nblock return from any to 224.0.0.18/32\n' | jexec one pfctl -f - >+ jexec one pfctl -e >+ >+ sleep 3 >+ jexec one sysctl net.inet.carp.demotion >+ >+ # Disable pf >+ jexec one pfctl -d >+ >+ sleep 7 >+ jexec one sysctl net.inet.carp.demotion >+} >+ >+send_error_cleanup() >+{ >+ vnet_cleanup >+} >+ > atf_init_test_cases() > { > atf_add_test_case "basic_v4" > atf_add_test_case "basic_v6" > atf_add_test_case "negative_demotion" >+ atf_add_test_case "send_error" > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 260406
:
230110
| 230375