The "ifq_set_maxlen(..., 1);" hack we use to enforce pipex(4) related
authormvs <mvs@openbsd.org>
Sun, 26 Jun 2022 15:50:21 +0000 (15:50 +0000)
committermvs <mvs@openbsd.org>
Sun, 26 Jun 2022 15:50:21 +0000 (15:50 +0000)
commitf6e6f8e73459654c7f56d30d63f5c188622ec57b
tree4dfc759d6d51cdd9c4388fc64d7474ebba653d08
parent06a5d68580ce46dc22e6874eac8cda10f44c202c
The "ifq_set_maxlen(..., 1);" hack we use to enforce pipex(4) related
(*if_qstart)() be always called with netlock held doesn't work anymore
with PPPOE sessions.

Introduce `pipex_list_mtx' mutex(9) and use it to protect global pipex(4)
lists and radix trees.

Protect pipex(4) `session' dereference with reference counters, because we
could sleep when accessing pipex(4) from ioctl(2) path, and this is not
possible with mutex(9) held.

ok bluhm@
sys/net/if_ethersubr.c
sys/net/if_gre.c
sys/net/if_pppx.c
sys/net/pipex.c
sys/net/pipex.h
sys/net/pipex_local.h
sys/netinet/ip_gre.c
sys/netinet/udp_usrreq.c