mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 12:48:33 -10:00
snl_init() always creates its own socket. Split out snl_init_fd(), which initialises the state on a descriptor the caller already holds, and make snl_init() open the socket and hand it over. The state owns the descriptor either way, including when initialisation fails, and snl_free() closes it; snl_clone() remains the way to borrow one. pfctl(8) needs this to run on a socket inherited from authpf(8). PR: 291981 Signed-off-by: Avinash Duduskar <[email protected]> Reviewed by: kp Pull Request: https://github.com/freebsd/freebsd-src/pull/2508