Files
freebsd-src/sys/netlink
Avinash Duduskar e4c78de63e netlink_snl: add snl_init_fd() to adopt an already open socket
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
2026-10-30 15:06:46 +01:00
..
2024-07-14 14:29:15 -04:00