-/* $OpenBSD: pf.c,v 1.1153 2022/11/12 02:48:14 kn Exp $ */
+/* $OpenBSD: pf.c,v 1.1154 2022/11/25 03:45:39 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
{
unsigned int interval = max(1, pf_default_rule.timeout[PFTM_INTERVAL]);
- /* XXX is NET_LOCK necessary? */
- NET_LOCK();
-
PF_LOCK();
pf_purge_expired_src_nodes();
* Fragments don't require PF_LOCK(), they use their own lock.
*/
pf_purge_expired_fragments();
- NET_UNLOCK();
/* interpret the interval as idle time between runs */
timeout_add_sec(&pf_purge_to, interval);
if (SLIST_EMPTY(&gcl))
return (scanned);
- NET_LOCK();
rw_enter_write(&pf_state_list.pfs_rwl);
PF_LOCK();
PF_STATE_ENTER_WRITE();
PF_STATE_EXIT_WRITE();
PF_UNLOCK();
rw_exit_write(&pf_state_list.pfs_rwl);
- NET_UNLOCK();
while ((st = SLIST_FIRST(&gcl)) != NULL) {
SLIST_REMOVE_HEAD(&gcl, gc_list);