aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2025-02-07 16:35:46 +0000
committerKristof Provost <kp@FreeBSD.org>2025-02-10 11:09:47 +0000
commit84a80eae6987bace1552882a7bb94e62fa1dc3ad (patch)
treec501afae61b01c876d0e35df06e7c4b00c54c8b6 /sbin
parentb452e72bda5eaa09d6fad94d3b538f21754c5313 (diff)
pf: convert DIOCRADDTABLES to netlink
Sponsored by: Rubicon Communications, LLC ("Netgate")
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/pfctl_radix.c15
1 files changed, 1 insertions, 14 deletions
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