summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-04-17 19:06:19 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-04-17 19:06:19 +0000
commit203257027fcca8a04afb5cd0b7c6cff0a3642af4 (patch)
tree004d050539a99241ce04a744eb9c66772ef8bec5 /sbin/pfctl/parse.y
parent17cbaef911e441d1871bb3dbdcc94efd73dd4c02 (diff)
Reset lineno for each file, so pfctl -R ... -N ... reports the right
line number for non-first files. Reported by aaron@
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 9b186b68e4f..3d871e0d052 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.57 2002/03/27 18:16:22 mickey Exp $ */
+/* $OpenBSD: parse.y,v 1.58 2002/04/17 19:06:18 dhartmei Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1713,6 +1713,7 @@ parse_rules(FILE *input, struct pfctl *xpf)
natmode = 0;
fin = input;
pf = xpf;
+ lineno = 1;
errors = 0;
yyparse();
return (errors ? -1 : 0);
@@ -1724,6 +1725,7 @@ parse_nat(FILE *input, struct pfctl *xpf)
natmode = 1;
fin = input;
pf = xpf;
+ lineno = 1;
errors = 0;
yyparse();
return (errors ? -1 : 0);