freebsd-src/sbin/pfctl
Kristof Provost f1612e7087 libpfctl: fix file descriptor leak
pfctl_get_rules_info() opened a netlink socket, but failed to close it again.
Fix this by factoring out the netlink-based function into a _h variant that
takes struct pfctl_handle, and implement pfctl_get_rules_info() based on that,
remembering to close the fd.

While here migrate all in-tree consumers to the _h variant.

MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-05-09 14:07:07 +02:00
..
tests pfctl tests: basic pflow parser test 2024-01-16 09:45:54 +01:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
parse.y pflow: add RFC8158 NAT support 2024-01-16 09:45:55 +01:00
pf.os Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
pf_print_state.c pf: allow pflow to be activated per rule 2024-01-16 09:45:54 +01:00
pf_ruleset.c sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
pfctl.8 pf: allow states to be killed by their pre-NAT address 2023-10-23 16:37:05 +02:00
pfctl.c libpfctl: fix file descriptor leak 2024-05-09 14:07:07 +02:00
pfctl.h pf: add a way to list creator ids 2023-10-10 11:48:21 +02:00
pfctl_altq.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pfctl_ioctl.h pfctl: Move ioctl abstraction functions into libpfctl 2021-04-10 11:16:02 +02:00
pfctl_optimize.c libpfctl: fix file descriptor leak 2024-05-09 14:07:07 +02:00
pfctl_osfp.c sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
pfctl_parser.c pf: allow pflow to be activated per rule 2024-01-16 09:45:54 +01:00
pfctl_parser.h libpfctl: fix file descriptor leak 2024-05-09 14:07:07 +02:00
pfctl_qstats.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pfctl_radix.c sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
pfctl_table.c sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00