summaryrefslogtreecommitdiff
path: root/sys/net/pf_ioctl.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-09-15 02:00:19 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-09-15 02:00:19 +0000
commit9d8236625502d9aebd87ee4b8aa759eb7dd062ae (patch)
tree608f67fdaff3caceaeb03f449b57d21037a3fe79 /sys/net/pf_ioctl.c
parent2470899b803a7fb5d135883edd5ddd82d6a592c7 (diff)
all pools have their ipl set via pool_setipl, so fold it into pool_init.
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r--sys/net/pf_ioctl.c42
1 files changed, 17 insertions, 25 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index 7b360b0db05..e8b364e7283 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.299 2016/09/03 17:11:40 sashan Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.300 2016/09/15 02:00:18 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -141,30 +141,22 @@ pfattach(int num)
{
u_int32_t *timeout = pf_default_rule.timeout;
- 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);
+ pool_init(&pf_rule_pl, sizeof(struct pf_rule), 0,
+ IPL_SOFTNET, 0, "pfrule", NULL);
+ pool_init(&pf_src_tree_pl, sizeof(struct pf_src_node), 0,
+ IPL_SOFTNET, 0, "pfsrctr", NULL);
+ pool_init(&pf_sn_item_pl, sizeof(struct pf_sn_item), 0,
+ IPL_SOFTNET, 0, "pfsnitem", NULL);
+ pool_init(&pf_state_pl, sizeof(struct pf_state), 0,
+ IPL_SOFTNET, 0, "pfstate", NULL);
+ pool_init(&pf_state_key_pl, sizeof(struct pf_state_key), 0,
+ IPL_SOFTNET, 0, "pfstkey", NULL);
+ pool_init(&pf_state_item_pl, sizeof(struct pf_state_item), 0,
+ IPL_SOFTNET, 0, "pfstitem", NULL);
+ pool_init(&pf_rule_item_pl, sizeof(struct pf_rule_item), 0,
+ IPL_SOFTNET, 0, "pfruleitem", NULL);
+ pool_init(&pf_queue_pl, sizeof(struct pf_queuespec), 0,
+ IPL_SOFTNET, 0, "pfqueue", NULL);
hfsc_initialize();
pfr_initialize();
pfi_initialize();