diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-02-27 18:11:46 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-02-27 18:11:46 +0000 |
commit | 0112a0c2d5320ea0e4034b4db6908c62fc3b8dc8 (patch) | |
tree | da89958338b60615d2632f32464cfa3d05f22826 /sbin/pfctl/parse.y | |
parent | d38e7e5fc0033ccf4c07ad762a5f02e37cab1ee1 (diff) |
Instead of printing useless @0 rule numbers from pfctl -vR, increase a
counter. Helps debugging rule sets that are not loaded. Suggested by
John Kerbawy.
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r-- | sbin/pfctl/parse.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index e46e082fbbf..ad86add008c 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.55 2002/01/11 22:26:41 mickey Exp $ */ +/* $OpenBSD: parse.y,v 1.56 2002/02/27 18:11:45 dhartmei Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -1265,8 +1265,10 @@ void expand_rule_hosts(struct pf_rule *r, if (rule_consistent(r) < 0 || nomatch) yyerror("skipping rule " "due to errors"); - else + else { + r->nr = pf->rule_nr++; pfctl_add_rule(pf, r); + } dst_port = dst_port->next; } dst_host = dst_host->next; |