Add missing kernel lock for Bi-directional Forwarding Detection data.
authormvs <mvs@openbsd.org>
Tue, 14 Sep 2021 09:15:55 +0000 (09:15 +0000)
committermvs <mvs@openbsd.org>
Tue, 14 Sep 2021 09:15:55 +0000 (09:15 +0000)
commit7853af7355314b198e29153656858f98a017f6c9
tree96b112e9894b7471e905fc76b2623c54788b8a5a
parent9fe3e0ec5d2b3ff612e819259b829fb7cf8c08d9
Add missing kernel lock for Bi-directional Forwarding Detection data.

Also bfdset() calls pool_get(9) with PR_WAITOK flag so it should be done
before we check the existence of this `bfd', otherwise it could be added
multiple times.

We have BFD disabled in the default kernel so this diff is for
consistency mostly.

ok mpi@
sys/net/bfd.c
sys/net/rtsock.c