summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_radix.c
diff options
context:
space:
mode:
authorCedric Berger <cedric@cvs.openbsd.org>2003-07-31 22:25:56 +0000
committerCedric Berger <cedric@cvs.openbsd.org>2003-07-31 22:25:56 +0000
commit71024192f8e6c068fce407d284f29caf19a22881 (patch)
treea0e5f6a9a8fa62cfce6cfea3891c42401256dfff /sbin/pfctl/pfctl_radix.c
parent8deaa5cb1bdad9c4505896866607f4272b307e9a (diff)
Make table tickets per-ruleset instead of global.
Make table tickets u_int32_t for consistency with other parts of PF. Ok dhartmei@ henning@
Diffstat (limited to 'sbin/pfctl/pfctl_radix.c')
-rw-r--r--sbin/pfctl/pfctl_radix.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl_radix.c b/sbin/pfctl/pfctl_radix.c
index 1ff36e3e643..a07285f49fd 100644
--- a/sbin/pfctl/pfctl_radix.c
+++ b/sbin/pfctl/pfctl_radix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_radix.c,v 1.18 2003/07/04 11:05:44 henning Exp $ */
+/* $OpenBSD: pfctl_radix.c,v 1.19 2003/07/31 22:25:54 cedric Exp $ */
/*
* Copyright (c) 2002 Cedric Berger
@@ -391,11 +391,13 @@ pfr_tst_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
}
int
-pfr_ina_begin(int *ticket, int *ndel, int flags)
+pfr_ina_begin(struct pfr_table *trs, int *ticket, int *ndel, int flags)
{
struct pfioc_table io;
bzero(&io, sizeof io);
+ if (trs != NULL)
+ io.pfrio_table = *trs;
io.pfrio_flags = flags;
if (ioctl(dev, DIOCRINABEGIN, &io))
return (-1);
@@ -407,11 +409,14 @@ pfr_ina_begin(int *ticket, int *ndel, int flags)
}
int
-pfr_ina_commit(int ticket, int *nadd, int *nchange, int flags)
+pfr_ina_commit(struct pfr_table *trs, int ticket, int *nadd, int *nchange,
+ int flags)
{
struct pfioc_table io;
bzero(&io, sizeof io);
+ if (trs != NULL)
+ io.pfrio_table = *trs;
io.pfrio_flags = flags;
io.pfrio_ticket = ticket;
if (ioctl(dev, DIOCRINACOMMIT, &io))