This commit is contained in:
purplerain 2023-06-29 10:53:26 +00:00
parent 905ea23f06
commit 91df569df5
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
32 changed files with 393 additions and 395 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pf_ioctl.c,v 1.409 2023/06/28 15:36:08 kn Exp $ */
/* $OpenBSD: pf_ioctl.c,v 1.410 2023/06/28 21:33:35 sashan Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@ -1506,11 +1506,15 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
int i;
t = pf_find_trans(minor(dev), pr->ticket);
if (t == NULL)
return (ENXIO);
if (t == NULL) {
error = ENXIO;
goto fail;
}
KASSERT(t->pft_unit == minor(dev));
if (t->pft_type != PF_TRANS_GETRULE)
return (EINVAL);
if (t->pft_type != PF_TRANS_GETRULE) {
error = EINVAL;
goto fail;
}
NET_LOCK();
PF_LOCK();