summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-04-13 17:01:13 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-04-13 17:01:13 +0000
commit1f32a7a62d60c316a28a16c6b78ec0421686569a (patch)
treee8fae4b9251c1f001e7bb8653316e8549a869113
parent7e2ee6105177db3527fa1dec2d1ae1578d9a7146 (diff)
move the bandwidth keyword from within the bandwidth target up to the
queue_opts target so the bandwidth parser can be used for other things too; will be needed for hfsc's linkshare etc
-rw-r--r--sbin/pfctl/parse.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index fa313d73305..37a6f5b66c2 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.356 2003/04/12 20:10:32 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.357 2003/04/13 17:01:12 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -922,13 +922,13 @@ queue_opts_l : queue_opts_l queue_opt
| queue_opt
;
-queue_opt : bandwidth {
+queue_opt : BANDWIDTH bandwidth {
if (queue_opts.marker & QOM_BWSPEC) {
yyerror("bandwidth cannot be respecified");
YYERROR;
}
queue_opts.marker |= QOM_BWSPEC;
- queue_opts.queue_bwspec = $1;
+ queue_opts.queue_bwspec = $2;
}
| PRIORITY number {
if (queue_opts.marker & QOM_PRIORITY) {
@@ -976,13 +976,13 @@ queue_opt : bandwidth {
}
;
-bandwidth : BANDWIDTH STRING {
+bandwidth : STRING {
double bps;
char *cp;
$$.bw_percent = 0;
- bps = strtod($2, &cp);
+ bps = strtod($1, &cp);
if (cp != NULL) {
if (!strcmp(cp, "b"))
; /* nothing */