summaryrefslogtreecommitdiff
path: root/sys/net/pf_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/pf_table.c')
-rw-r--r--sys/net/pf_table.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c
index 19f5b5787cc..78610d0e7df 100644
--- a/sys/net/pf_table.c
+++ b/sys/net/pf_table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_table.c,v 1.99 2013/07/02 05:57:37 guenther Exp $ */
+/* $OpenBSD: pf_table.c,v 1.100 2013/07/04 00:19:00 guenther Exp $ */
/*
* Copyright (c) 2002 Cedric Berger
@@ -153,10 +153,10 @@ struct pfr_kentry *pfr_create_kentry(struct pfr_addr *, u_int32_t);
void pfr_destroy_kentries(struct pfr_kentryworkq *);
void pfr_destroy_kentry(struct pfr_kentry *);
void pfr_insert_kentries(struct pfr_ktable *,
- struct pfr_kentryworkq *, long);
+ struct pfr_kentryworkq *, time_t);
void pfr_remove_kentries(struct pfr_ktable *,
struct pfr_kentryworkq *);
-void pfr_clstats_kentries(struct pfr_kentryworkq *, long,
+void pfr_clstats_kentries(struct pfr_kentryworkq *, time_t,
int);
void pfr_reset_feedback(struct pfr_addr *, int, int);
void pfr_prepare_network(union sockaddr_union *, int, int);
@@ -167,15 +167,16 @@ int pfr_unroute_kentry(struct pfr_ktable *,
int pfr_walktree(struct radix_node *, void *, u_int);
int pfr_validate_table(struct pfr_table *, int, int);
int pfr_fix_anchor(char *);
-void pfr_commit_ktable(struct pfr_ktable *, long);
+void pfr_commit_ktable(struct pfr_ktable *, time_t);
void pfr_insert_ktables(struct pfr_ktableworkq *);
void pfr_insert_ktable(struct pfr_ktable *);
void pfr_setflags_ktables(struct pfr_ktableworkq *);
void pfr_setflags_ktable(struct pfr_ktable *, int);
-void pfr_clstats_ktables(struct pfr_ktableworkq *, long,
+void pfr_clstats_ktables(struct pfr_ktableworkq *, time_t,
+ int);
+void pfr_clstats_ktable(struct pfr_ktable *, time_t, int);
+struct pfr_ktable *pfr_create_ktable(struct pfr_table *, time_t, int,
int);
-void pfr_clstats_ktable(struct pfr_ktable *, long, int);
-struct pfr_ktable *pfr_create_ktable(struct pfr_table *, long, int, int);
void pfr_destroy_ktables(struct pfr_ktableworkq *, int);
void pfr_destroy_ktable(struct pfr_ktable *, int);
int pfr_ktable_compare(struct pfr_ktable *,
@@ -271,7 +272,7 @@ pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
struct pfr_kentry *p, *q;
struct pfr_addr ad;
int i, rv, xadd = 0;
- long tzero = time_second;
+ time_t tzero = time_second;
ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY | PFR_FLAG_FEEDBACK);
if (pfr_validate_table(tbl, 0, flags & PFR_FLAG_USERIOCTL))
@@ -438,7 +439,7 @@ pfr_set_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size,
struct pfr_kentry *p, *q;
struct pfr_addr ad;
int i, rv, xadd = 0, xdel = 0, xchange = 0;
- long tzero = time_second;
+ time_t tzero = time_second;
ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY | PFR_FLAG_FEEDBACK);
if (pfr_validate_table(tbl, ignore_pfrt_flags, flags &
@@ -630,7 +631,7 @@ pfr_get_astats(struct pfr_table *tbl, struct pfr_astats *addr, int *size,
struct pfr_walktree w;
struct pfr_kentryworkq workq;
int rv;
- long tzero = time_second;
+ time_t tzero = time_second;
if (pfr_validate_table(tbl, 0, 0))
return (EINVAL);
@@ -885,7 +886,7 @@ pfr_destroy_kentry(struct pfr_kentry *ke)
void
pfr_insert_kentries(struct pfr_ktable *kt,
- struct pfr_kentryworkq *workq, long tzero)
+ struct pfr_kentryworkq *workq, time_t tzero)
{
struct pfr_kentry *p;
int rv, n = 0;
@@ -909,7 +910,7 @@ pfr_insert_kentries(struct pfr_ktable *kt,
}
int
-pfr_insert_kentry(struct pfr_ktable *kt, struct pfr_addr *ad, long tzero)
+pfr_insert_kentry(struct pfr_ktable *kt, struct pfr_addr *ad, time_t tzero)
{
struct pfr_kentry *p;
int rv;
@@ -974,7 +975,7 @@ pfr_clean_node_mask(struct pfr_ktable *kt,
}
void
-pfr_clstats_kentries(struct pfr_kentryworkq *workq, long tzero, int negchange)
+pfr_clstats_kentries(struct pfr_kentryworkq *workq, time_t tzero, int negchange)
{
struct pfr_kentry *p;
int s;
@@ -1243,7 +1244,7 @@ pfr_add_tables(struct pfr_table *tbl, int size, int *nadd, int flags)
struct pfr_ktableworkq addq, changeq;
struct pfr_ktable *p, *q, *r, key;
int i, rv, xadd = 0;
- long tzero = time_second;
+ time_t tzero = time_second;
ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY);
SLIST_INIT(&addq);
@@ -1394,7 +1395,7 @@ pfr_get_tstats(struct pfr_table *filter, struct pfr_tstats *tbl, int *size,
struct pfr_ktable *p;
struct pfr_ktableworkq workq;
int s, n, nn;
- long tzero = time_second;
+ time_t tzero = time_second;
/* XXX PFR_FLAG_CLSTATS disabled */
ACCEPT_FLAGS(flags, PFR_FLAG_ALLRSETS);
@@ -1439,7 +1440,7 @@ pfr_clr_tstats(struct pfr_table *tbl, int size, int *nzero, int flags)
struct pfr_ktableworkq workq;
struct pfr_ktable *p, key;
int i, xzero = 0;
- long tzero = time_second;
+ time_t tzero = time_second;
ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY | PFR_FLAG_ADDRSTOO);
SLIST_INIT(&workq);
@@ -1692,7 +1693,7 @@ pfr_ina_commit(struct pfr_table *trs, u_int32_t ticket, int *nadd,
struct pfr_ktableworkq workq;
struct pf_ruleset *rs;
int xadd = 0, xchange = 0;
- long tzero = time_second;
+ time_t tzero = time_second;
ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY);
rs = pf_find_ruleset(trs->pfrt_anchor);
@@ -1728,7 +1729,7 @@ pfr_ina_commit(struct pfr_table *trs, u_int32_t ticket, int *nadd,
}
void
-pfr_commit_ktable(struct pfr_ktable *kt, long tzero)
+pfr_commit_ktable(struct pfr_ktable *kt, time_t tzero)
{
struct pfr_ktable *shadow = kt->pfrkt_shadow;
int nflags;
@@ -1925,7 +1926,7 @@ pfr_setflags_ktable(struct pfr_ktable *kt, int newf)
}
void
-pfr_clstats_ktables(struct pfr_ktableworkq *workq, long tzero, int recurse)
+pfr_clstats_ktables(struct pfr_ktableworkq *workq, time_t tzero, int recurse)
{
struct pfr_ktable *p;
@@ -1934,7 +1935,7 @@ pfr_clstats_ktables(struct pfr_ktableworkq *workq, long tzero, int recurse)
}
void
-pfr_clstats_ktable(struct pfr_ktable *kt, long tzero, int recurse)
+pfr_clstats_ktable(struct pfr_ktable *kt, time_t tzero, int recurse)
{
struct pfr_kentryworkq addrq;
int s;
@@ -1952,7 +1953,7 @@ pfr_clstats_ktable(struct pfr_ktable *kt, long tzero, int recurse)
}
struct pfr_ktable *
-pfr_create_ktable(struct pfr_table *tbl, long tzero, int attachruleset,
+pfr_create_ktable(struct pfr_table *tbl, time_t tzero, int attachruleset,
int intr)
{
struct pfr_ktable *kt;