diff options
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r-- | sys/net/pf_ioctl.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 735ff7d6ffd..a4dba038b8d 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.274 2014/07/22 11:06:09 mpi Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.275 2014/08/12 14:38:28 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -309,20 +309,15 @@ pf_rm_rule(struct pf_rulequeue *rulequeue, struct pf_rule *rule) void pf_purge_rule(struct pf_ruleset *ruleset, struct pf_rule *rule) { - u_int32_t nr; + u_int32_t nr = 0; - if (ruleset == NULL || ruleset->anchor == NULL) - return; + KASSERT(ruleset != NULL && rule != NULL); pf_rm_rule(ruleset->rules.active.ptr, rule); ruleset->rules.active.rcount--; - - nr = 0; TAILQ_FOREACH(rule, ruleset->rules.active.ptr, entries) rule->nr = nr++; - ruleset->rules.active.ticket++; - pf_calc_skip_steps(ruleset->rules.active.ptr); pf_remove_if_empty_ruleset(ruleset); } |