summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-09-02 10:19:50 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-09-02 10:19:50 +0000
commit02b3a8e38c957da2740a8da3b0521ea68c609cad (patch)
tree288c4185c0dc244e5595cb1789c9e55dd39c1953
parent8805d198654bb5cb75fbfa567864bcf82fefa3b3 (diff)
pool_setipl for pf bits
ok phessler@ henning@
-rw-r--r--sys/net/pf_if.c3
-rw-r--r--sys/net/pf_ioctl.c10
-rw-r--r--sys/net/pf_norm.c5
-rw-r--r--sys/net/pf_osfp.c4
-rw-r--r--sys/net/pf_table.c7
5 files changed, 24 insertions, 5 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c
index fdef0783f43..53fd9662faf 100644
--- a/sys/net/pf_if.c
+++ b/sys/net/pf_if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_if.c,v 1.82 2015/11/20 03:35:23 dlg Exp $ */
+/* $OpenBSD: pf_if.c,v 1.83 2016/09/02 10:19:49 dlg Exp $ */
/*
* Copyright 2005 Henning Brauer <henning@openbsd.org>
@@ -90,6 +90,7 @@ pfi_initialize(void)
pool_init(&pfi_addr_pl, sizeof(struct pfi_dynaddr), 0, 0, 0,
"pfiaddrpl", NULL);
+ pool_setipl(&pfi_addr_pl, IPL_SOFTNET);
pfi_buffer_max = 64;
pfi_buffer = mallocarray(pfi_buffer_max, sizeof(*pfi_buffer),
PFI_MTYPE, M_WAITOK);
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index 19c95ddf2db..32359ac56c6 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.297 2015/12/03 13:30:18 claudio Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.298 2016/09/02 10:19:49 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -143,20 +143,28 @@ pfattach(int num)
pool_init(&pf_rule_pl, sizeof(struct pf_rule), 0, 0, 0, "pfrule",
NULL);
+ pool_setipl(&pf_rule_pl, IPL_SOFTNET);
pool_init(&pf_src_tree_pl, sizeof(struct pf_src_node), 0, 0, 0,
"pfsrctr", NULL);
+ pool_setipl(&pf_src_tree_pl, IPL_SOFTNET);
pool_init(&pf_sn_item_pl, sizeof(struct pf_sn_item), 0, 0, 0,
"pfsnitem", NULL);
+ pool_setipl(&pf_sn_item_pl, IPL_SOFTNET);
pool_init(&pf_state_pl, sizeof(struct pf_state), 0, 0, 0, "pfstate",
NULL);
+ pool_setipl(&pf_state_pl, IPL_SOFTNET);
pool_init(&pf_state_key_pl, sizeof(struct pf_state_key), 0, 0, 0,
"pfstkey", NULL);
+ pool_setipl(&pf_state_key_pl, IPL_SOFTNET);
pool_init(&pf_state_item_pl, sizeof(struct pf_state_item), 0, 0, 0,
"pfstitem", NULL);
+ pool_setipl(&pf_state_item_pl, IPL_SOFTNET);
pool_init(&pf_rule_item_pl, sizeof(struct pf_rule_item), 0, 0, 0,
"pfruleitem", NULL);
+ pool_setipl(&pf_rule_item_pl, IPL_SOFTNET);
pool_init(&pf_queue_pl, sizeof(struct pf_queuespec), 0, 0, 0,
"pfqueue", NULL);
+ pool_setipl(&pf_queue_pl, IPL_SOFTNET);
hfsc_initialize();
pfr_initialize();
pfi_initialize();
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c
index 450c151c4ee..2410f428a7f 100644
--- a/sys/net/pf_norm.c
+++ b/sys/net/pf_norm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_norm.c,v 1.190 2016/08/24 09:41:12 mpi Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.191 2016/09/02 10:19:49 dlg Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@@ -139,10 +139,13 @@ pf_normalize_init(void)
{
pool_init(&pf_frent_pl, sizeof(struct pf_frent), 0, 0, 0, "pffrent",
NULL);
+ pool_setipl(&pf_frent_pl, IPL_SOFTNET);
pool_init(&pf_frag_pl, sizeof(struct pf_fragment), 0, 0, 0, "pffrag",
NULL);
+ pool_setipl(&pf_frag_pl, IPL_SOFTNET);
pool_init(&pf_state_scrub_pl, sizeof(struct pf_state_scrub), 0, 0, 0,
"pfstscr", NULL);
+ pool_setipl(&pf_state_scrub_pl, IPL_SOFTNET);
pool_sethiwat(&pf_frag_pl, PFFRAG_FRAG_HIWAT);
pool_sethardlimit(&pf_frent_pl, PFFRAG_FRENT_HIWAT, NULL, 0);
diff --git a/sys/net/pf_osfp.c b/sys/net/pf_osfp.c
index 84b7edb28c6..b1e82ab524c 100644
--- a/sys/net/pf_osfp.c
+++ b/sys/net/pf_osfp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_osfp.c,v 1.34 2016/07/19 13:34:12 henning Exp $ */
+/* $OpenBSD: pf_osfp.c,v 1.35 2016/09/02 10:19:49 dlg Exp $ */
/*
* Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org>
@@ -289,8 +289,10 @@ pf_osfp_initialize(void)
{
pool_init(&pf_osfp_entry_pl, sizeof(struct pf_osfp_entry), 0, 0,
PR_WAITOK, "pfosfpen", NULL);
+ pool_setipl(&pf_osfp_entry_pl, IPL_NONE);
pool_init(&pf_osfp_pl, sizeof(struct pf_os_fingerprint), 0, 0,
PR_WAITOK, "pfosfp", NULL);
+ pool_setipl(&pf_osfp_pl, IPL_NONE);
SLIST_INIT(&pf_osfp_list);
}
diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c
index be767440837..e6bca20c371 100644
--- a/sys/net/pf_table.c
+++ b/sys/net/pf_table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_table.c,v 1.116 2015/11/03 22:10:33 sashan Exp $ */
+/* $OpenBSD: pf_table.c,v 1.117 2016/09/02 10:19:49 dlg Exp $ */
/*
* Copyright (c) 2002 Cedric Berger
@@ -217,15 +217,20 @@ pfr_initialize(void)
pool_init(&pfr_ktable_pl, sizeof(struct pfr_ktable), 0, 0, 0,
"pfrktable", NULL);
+ pool_setipl(&pfr_ktable_pl, IPL_SOFTNET);
pool_init(&pfr_kentry_pl[PFRKE_PLAIN], sizeof(struct pfr_kentry),
0, 0, 0, "pfrke_plain", NULL);
+ pool_setipl(&pfr_kentry_pl[PFRKE_PLAIN], IPL_SOFTNET);
pool_init(&pfr_kentry_pl[PFRKE_ROUTE], sizeof(struct pfr_kentry_route),
0, 0, 0, "pfrke_route", NULL);
+ pool_setipl(&pfr_kentry_pl[PFRKE_ROUTE], IPL_SOFTNET);
pool_init(&pfr_kentry_pl[PFRKE_COST], sizeof(struct pfr_kentry_cost),
0, 0, 0, "pfrke_cost", NULL);
+ pool_setipl(&pfr_kentry_pl[PFRKE_COST], IPL_SOFTNET);
pool_init(&pfr_kcounters_pl, sizeof(struct pfr_kcounters),
0, 0, 0, "pfrkcounters", NULL);
+ pool_setipl(&pfr_kcounters_pl, IPL_SOFTNET);
pfr_sin.sin_len = sizeof(pfr_sin);
pfr_sin.sin_family = AF_INET;