All pools are init'd after pfattach(), none is ever destroyed,
so struct pf_pool_limit's .pp always points to valid pools.
Drop a check for the impossible from twenty years ago.
OK sashan dlg
-/* $OpenBSD: pf_ioctl.c,v 1.403 2023/05/03 10:32:48 kn Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.404 2023/05/11 12:36:22 kn Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
NET_LOCK();
PF_LOCK();
- if (pl->index < 0 || pl->index >= PF_LIMIT_MAX ||
- pf_pool_limits[pl->index].pp == NULL) {
+ if (pl->index < 0 || pl->index >= PF_LIMIT_MAX) {
error = EINVAL;
PF_UNLOCK();
NET_UNLOCK();