diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2011-06-02 22:08:41 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2011-06-02 22:08:41 +0000 |
commit | 30eae0b76cae8a7f47316c4ff805ec497fd4505f (patch) | |
tree | 689a14d023322a695516d69b5055a51b5b13b71f /sys | |
parent | 782a7300cedfa5b9fbe695306bf6e9733e9ff3bb (diff) |
When checking to see if a rule is referenced by any source-tracking nodes,
actually check how many src nodes reference it, rather than checking the
max_src_nodes for the rule which makes no sense. From Martin Pelikan.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index ed85dae824c..98b54e8f05f 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.746 2011/05/25 06:48:12 claudio Exp $ */ +/* $OpenBSD: pf.c,v 1.747 2011/06/02 22:08:40 sthen Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -593,7 +593,7 @@ pf_remove_src_node(struct pf_src_node *sn) if (sn->rule.ptr != NULL) { sn->rule.ptr->src_nodes--; if (sn->rule.ptr->states_cur <= 0 && - sn->rule.ptr->max_src_nodes <= 0) + sn->rule.ptr->src_nodes <= 0) pf_rm_rule(NULL, sn->rule.ptr); RB_REMOVE(pf_src_tree, &tree_src_tracking, sn); pf_status.scounters[SCNT_SRC_NODE_REMOVALS]++; |