From 84a80eae6987bace1552882a7bb94e62fa1dc3ad Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 7 Feb 2025 17:35:46 +0100 Subject: pf: convert DIOCRADDTABLES to netlink Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_radix.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'sbin') diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c index 49a20d6c98f4..7cb9b6faa0d9 100644 --- a/sbin/pfctl/pfctl_radix.c +++ b/sbin/pfctl/pfctl_radix.c @@ -76,20 +76,7 @@ pfr_report_error(struct pfr_table *tbl, struct pfioc_table *io, int pfr_add_table(struct pfr_table *tbl, int *nadd, int flags) { - struct pfioc_table io; - - bzero(&io, sizeof io); - io.pfrio_flags = flags; - io.pfrio_buffer = tbl; - io.pfrio_esize = sizeof(*tbl); - io.pfrio_size = 1; - if (ioctl(dev, DIOCRADDTABLES, &io)) { - pfr_report_error(tbl, &io, "add table"); - return (-1); - } - if (nadd != NULL) - *nadd = io.pfrio_nadd; - return (0); + return (pfctl_add_table(pfh, tbl, nadd, flags)); } int -- cgit v1.2.3