Remove net lock from DIOCGETTIMEOUT
authorkn <kn@openbsd.org>
Thu, 27 Apr 2023 12:10:30 +0000 (12:10 +0000)
committerkn <kn@openbsd.org>
Thu, 27 Apr 2023 12:10:30 +0000 (12:10 +0000)
commit8cfc1ee57a049402d88ef882a298a1628e046446
tree8d68e42ecad70e7a668e5b39967f3e144fd925bb
parent4f11ab529b12eb179112eccee64a363dbf3cd63b
Remove net lock from DIOCGETTIMEOUT

'pfctl -s timeouts' values are only used inside of pf, entirely protected
by the pf lock through the ioctl interface;  the net lock is useless.

Previous attempts to remove net lock usage showed that the pf lock cannot
yet entirely replace it, so start with small pieces like this one.

Contrary to IPv4/6 read-only ioctls, some pf ioctls without FWRITE flag do
modify internal pf state, which is not entirely obvious when approached
from the ioctl layer.

OK sashan dlg
sys/net/pf_ioctl.c