From 6e0981637714f798f12ff476371a439f89155c54 Mon Sep 17 00:00:00 2001 From: kn Date: Tue, 27 Jun 2023 17:29:38 +0000 Subject: [PATCH] Remove net lock from DIOC{SET,CLR}IFFLAG pf.conf's 'set skip on ifN' and 'pfctl -F all|Reset' set and clear flags, PFI_IFLAG_SKIP being the only flag. Nothing else in base uses these ioctls and internal state is protected by the pf lock already. OK sashan --- sys/net/pf_ioctl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 36779cfdfd3..499330b84b0 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.406 2023/06/26 07:49:48 claudio Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.407 2023/06/27 17:29:38 kn Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2964,11 +2964,9 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) goto fail; } - NET_LOCK(); PF_LOCK(); error = pfi_set_flags(io->pfiio_name, io->pfiio_flags); PF_UNLOCK(); - NET_UNLOCK(); break; } @@ -2980,11 +2978,9 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) goto fail; } - NET_LOCK(); PF_LOCK(); error = pfi_clear_flags(io->pfiio_name, io->pfiio_flags); PF_UNLOCK(); - NET_UNLOCK(); break; } -- 2.20.1