diff options
author | 2005-05-27 18:53:09 +0000 | |
---|---|---|
committer | 2005-05-27 18:53:09 +0000 | |
commit | 5f46ddba62c339b772db9ef25d4440f5cd6e8a7d (patch) | |
tree | 9afaee7c15ba17b3a7b4a6358003f610467aacbb | |
parent | get rid of 'log-all'. now that we have 'log (options)', make 'all' an (diff) | |
download | wireguard-openbsd-5f46ddba62c339b772db9ef25d4440f5cd6e8a7d.tar.xz wireguard-openbsd-5f46ddba62c339b772db9ef25d4440f5cd6e8a7d.zip |
add back ACCEPT_GLAGS and active flag check, pointed out by cedric
-rw-r--r-- | sys/net/pf_table.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c index 0bb46dfc021..49f2335da6c 100644 --- a/sys/net/pf_table.c +++ b/sys/net/pf_table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_table.c,v 1.64 2005/05/23 23:28:53 dhartmei Exp $ */ +/* $OpenBSD: pf_table.c,v 1.65 2005/05/27 18:53:09 henning Exp $ */ /* * Copyright (c) 2002 Cedric Berger @@ -557,10 +557,11 @@ pfr_get_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int *size, struct pfr_walktree w; int rv; + ACCEPT_FLAGS(0); if (pfr_validate_table(tbl, 0, 0)) return (EINVAL); kt = pfr_lookup_table(tbl); - if (kt == NULL) + if (kt == NULL || !(kt->pfrkt_flags & PFR_TFLAG_ACTIVE)) return (ESRCH); if (kt->pfrkt_cnt > *size) { *size = kt->pfrkt_cnt; |