summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/pfctl/parse.y10
-rw-r--r--sbin/pfctl/pfctl_parser.c15
2 files changed, 12 insertions, 13 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 34113c5d32c..85570d838a7 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.490 2005/05/27 18:41:29 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.491 2005/05/27 18:52:41 dhartmei Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -395,7 +395,7 @@ typedef struct {
%}
-%token PASS BLOCK SCRUB RETURN IN OS OUT LOG LOGALL QUICK ON FROM TO FLAGS
+%token PASS BLOCK SCRUB RETURN IN OS OUT LOG QUICK ON FROM TO FLAGS
%token RETURNRST RETURNICMP RETURNICMP6 PROTO INET INET6 ALL ANY ICMPTYPE
%token ICMP6TYPE CODE KEEP MODULATE STATE PORT RDR NAT BINAT ARROW NODF
%token MINTTL ERROR ALLOWOPTS FASTROUTE FILENAME ROUTETO DUPTO REPLYTO NO LABEL
@@ -2030,14 +2030,13 @@ logquick : /* empty */ { $$.log = 0; $$.quick = 0; }
log : LOG { $$ = PF_LOG; }
| LOG '(' logopts ')' { $$ = PF_LOG | $3; }
- | LOGALL { $$ = PF_LOG_ALL; }
- | LOGALL '(' logopts ')' { $$ = PF_LOG_ALL | $3; }
;
logopts : logopt { $$ = $1; }
| logopts comma logopt { $$ = $1 | $3; }
-logopt : USER { $$ = PF_LOG_SOCKET_LOOKUP; }
+logopt : ALL { $$ = PF_LOG_ALL; }
+ | USER { $$ = PF_LOG_SOCKET_LOOKUP; }
| GROUP { $$ = PF_LOG_SOCKET_LOOKUP; }
interface : /* empty */ { $$ = NULL; }
@@ -4614,7 +4613,6 @@ lookup(char *s)
{ "linkshare", LINKSHARE},
{ "load", LOAD},
{ "log", LOG},
- { "log-all", LOGALL},
{ "loginterface", LOGINTERFACE},
{ "max", MAXIMUM},
{ "max-mss", MAXMSS},
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 2e2fb19efae..29b991788c4 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.214 2005/05/27 17:22:40 dhartmei Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.215 2005/05/27 18:52:42 dhartmei Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -715,14 +715,15 @@ print_rule(struct pf_rule *r, const char *anchor_call, int verbose)
else if (r->direction == PF_OUT)
printf(" out");
if (r->log) {
- if (r->log & PF_LOG_ALL)
- printf(" log-all");
- else
- printf(" log");
- if (r->log & ~(PF_LOG | PF_LOG_ALL)) {
+ printf(" log");
+ if (r->log & ~PF_LOG) {
+ int count = 0;
+
printf(" (");
+ if (r->log & PF_LOG_ALL)
+ printf("%sall", count++ ? ", " : "");
if (r->log & PF_LOG_SOCKET_LOOKUP)
- printf("user");
+ printf("%suser", count++ ? ", " : "");
printf(")");
}
}