summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2001-09-28 14:12:16 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2001-09-28 14:12:16 +0000
commitc18d4ef2e6756ffdd6b5a5464b46dfea56f11000 (patch)
treeb16d0870b11201ddf31c4e965f43e8670e25460a
parent3771420b8f178cc3edbd8e6a44f1304a39b035d7 (diff)
Support underscores in macro names and document it in the man page.
-rw-r--r--sbin/pfctl/parse.y4
-rw-r--r--share/man/man5/pf.conf.511
2 files changed, 9 insertions, 6 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 192938f1c86..28b48afba6f 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.36 2001/09/20 18:31:44 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.37 2001/09/28 14:12:15 dhartmei Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1272,7 +1272,7 @@ top:
yyerror("string too long");
return (findeol());
}
- if (isalnum(c)) {
+ if (isalnum(c) || c == '_') {
*p++ = (char)c;
continue;
}
diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5
index 72b103d4a3f..88e3a40306b 100644
--- a/share/man/man5/pf.conf.5
+++ b/share/man/man5/pf.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pf.conf.5,v 1.16 2001/09/25 19:55:25 dhartmei Exp $
+.\" $OpenBSD: pf.conf.5,v 1.17 2001/09/28 14:12:15 dhartmei Exp $
.\"
.\" Copyright (c) 2001, Daniel Hartmeier
.\" All rights reserved.
@@ -244,10 +244,13 @@ must match.
.Em pfctl
supports macro definition and expansion like:
.Bd -literal
- if="kue0"
- pass out on $if from any to any keep state
- pass in on $if from any to any port = 25 keep state
+ ext_if = "kue0"
+ pass out on $ext_if from any to any keep state
+ pass in on $ext_if from any to any port = 25 keep state
.Ed
+.Pp
+Macro names must start with a letter and may contain letters, digits
+and underscores.
.Sh STATEFUL INSPECTION
.Em pf
is a stateful packet filter, which means it can track the state of