-/* $OpenBSD: pf.c,v 1.1174 2023/04/28 14:08:34 phessler Exp $ */
+/* $OpenBSD: pf.c,v 1.1175 2023/05/03 10:32:47 kn Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
int error = ENOMEM;
int n = 0;
+ PF_ASSERT_LOCKED();
+
if (sp->creatorid == 0) {
DPFPRINTF(LOG_NOTICE, "%s: invalid creator id: %08x", __func__,
ntohl(sp->creatorid));
struct pf_test_ctx ctx;
int rv;
+ PF_ASSERT_LOCKED();
+
memset(&ctx, 0, sizeof(ctx));
ctx.pd = pd;
ctx.rm = rm;
-/* $OpenBSD: pf_ioctl.c,v 1.402 2023/04/29 10:25:32 kn Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.403 2023/05/03 10:32:48 kn Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
struct pf_rulequeue *old_rules;
u_int32_t old_rcount;
+ PF_ASSERT_LOCKED();
+
rs = pf_find_ruleset(anchor);
if (rs == NULL || !rs->rules.inactive.open ||
version != rs->rules.inactive.version)
struct pf_ruleset *ruleset;
struct pf_anchor *anchor;
- NET_LOCK();
PF_LOCK();
pr->path[sizeof(pr->path) - 1] = '\0';
if ((ruleset = pf_find_ruleset(pr->path)) == NULL) {
error = EINVAL;
PF_UNLOCK();
- NET_UNLOCK();
goto fail;
}
pr->nr = 0;
pr->nr++;
}
PF_UNLOCK();
- NET_UNLOCK();
break;
}
struct pf_anchor *anchor;
u_int32_t nr = 0;
- NET_LOCK();
PF_LOCK();
pr->path[sizeof(pr->path) - 1] = '\0';
if ((ruleset = pf_find_ruleset(pr->path)) == NULL) {
error = EINVAL;
PF_UNLOCK();
- NET_UNLOCK();
goto fail;
}
pr->name[0] = '\0';
}
}
PF_UNLOCK();
- NET_UNLOCK();
if (!pr->name[0])
error = EBUSY;
break;