summaryrefslogtreecommitdiff
path: root/net/pf_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/pf_table.c')
-rw-r--r--net/pf_table.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/pf_table.c b/net/pf_table.c
index 98c3d560e602..eebe03bcb7ec 100644
--- a/net/pf_table.c
+++ b/net/pf_table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_table.c,v 1.70 2007/05/23 11:53:45 markus Exp $ */
+/* $OpenBSD: pf_table.c,v 1.72 2007/12/20 20:07:41 reyk Exp $ */
/*
* Copyright (c) 2002 Cedric Berger
@@ -35,6 +35,7 @@
#include <sys/socket.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
+#include <sys/pool.h>
#include <net/if.h>
#include <net/route.h>
@@ -2121,8 +2122,10 @@ pfr_pool_get(struct pfr_ktable *kt, int *pidx, struct pf_addr *counter,
_next_block:
ke = pfr_kentry_byidx(kt, idx, af);
- if (ke == NULL)
+ if (ke == NULL) {
+ kt->pfrkt_nomatch++;
return (1);
+ }
pfr_prepare_network(&pfr_mask, af, ke->pfrke_net);
*raddr = SUNION2PF(&ke->pfrke_sa, af);
*rmask = SUNION2PF(&pfr_mask, af);
@@ -2145,6 +2148,7 @@ _next_block:
/* this is a single IP address - no possible nested block */
PF_ACPY(counter, addr, af);
*pidx = idx;
+ kt->pfrkt_match++;
return (0);
}
for (;;) {
@@ -2160,6 +2164,7 @@ _next_block:
/* lookup return the same block - perfect */
PF_ACPY(counter, addr, af);
*pidx = idx;
+ kt->pfrkt_match++;
return (0);
}