diff options
author | 2001-09-28 14:12:15 +0000 | |
---|---|---|
committer | 2001-09-28 14:12:15 +0000 | |
commit | b4d170daead79b2a14232f3c37f1775ece83e946 (patch) | |
tree | 2c35b61b23dc10b50c8024597bfa773fdefbd148 | |
parent | Fix a DIAGNOSTIC check. (diff) | |
download | wireguard-openbsd-b4d170daead79b2a14232f3c37f1775ece83e946.tar.xz wireguard-openbsd-b4d170daead79b2a14232f3c37f1775ece83e946.zip |
Support underscores in macro names and document it in the man page.
-rw-r--r-- | sbin/pfctl/parse.y | 4 | ||||
-rw-r--r-- | share/man/man5/pf.conf.5 | 11 |
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 |