]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
privsep: Don't find processes we just asked to stop
authorRoy Marples <roy@marples.name>
Fri, 2 Sep 2022 11:54:25 +0000 (12:54 +0100)
committerRoy Marples <roy@marples.name>
Fri, 2 Sep 2022 11:54:25 +0000 (12:54 +0100)
commitce13b79d78df81de388b2448d4edce4f3e16c66a
tree45a2018fd754adaf003de0f4c0a22e4b5f0ef611
parent23d4f3d8065d9a3b26cca1f00c380d8dfe22d696
privsep: Don't find processes we just asked to stop

We could rebind a lease, get a NAK and enter DISCOVER.
We need to restart the BPF in the middle as the BPF filter could
change.

As such, add a started flag to each privsep process and when
searching for a process by id only find started ones.
If we ask them to stop then the started flag is removed.

Fixes errors about writing to stopping processes an unknown
processes exiting.
src/privsep.c
src/privsep.h