diff options
author | 2005-05-23 23:28:53 +0000 | |
---|---|---|
committer | 2005-05-23 23:28:53 +0000 | |
commit | 00fec5ea75415c68f05ea6d734772a8187b51e72 (patch) | |
tree | a246839380b8b68bbbdbd28165a106c944efcde0 /sys/net/pf.c | |
parent | loose is not lose. ok deraadt tdeval and a few more typos from jfb (diff) | |
download | wireguard-openbsd-00fec5ea75415c68f05ea6d734772a8187b51e72.tar.xz wireguard-openbsd-00fec5ea75415c68f05ea6d734772a8187b51e72.zip |
change pool allocation of table entries, no longer use the oldnointr
allocator and two pools, but PR_WAITOK when called from non-interrupt
context (ioctl). add configurable hard limits for tables and table
entries (set limit tables/table-entries), defaulting to 1000/100000.
ok aaron@, henning@, mcbride@, art@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 86c220cd25e..8dea6c47aca 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.489 2005/05/21 21:03:57 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.490 2005/05/23 23:28:53 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -218,10 +218,15 @@ struct pf_state *pf_find_state_recurse(struct pfi_kif *, int pf_src_connlimit(struct pf_state **); int pf_check_congestion(struct ifqueue *); +extern struct pool pfr_ktable_pl; +extern struct pool pfr_kentry_pl; + struct pf_pool_limit pf_pool_limits[PF_LIMIT_MAX] = { { &pf_state_pl, PFSTATE_HIWAT }, { &pf_src_tree_pl, PFSNODE_HIWAT }, - { &pf_frent_pl, PFFRAG_FRENT_HIWAT } + { &pf_frent_pl, PFFRAG_FRENT_HIWAT }, + { &pfr_ktable_pl, PFR_KTABLE_HIWAT }, + { &pfr_kentry_pl, PFR_KENTRY_HIWAT } }; #define STATE_LOOKUP() \ |