diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2002-11-27 18:50:33 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2002-11-27 18:50:33 +0000 |
commit | 849d57038a6cc090790309a164887d0b15cc7bf8 (patch) | |
tree | 8312caeb25ba98d9d8b92fc2254615413ea55545 | |
parent | ffa9a0ea76b607337beefe8bc976e40197aab0d8 (diff) |
handle the "no bandwidth specified" case earlier and easier.
-rw-r--r-- | sbin/pfctl/parse.y | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index c48025feed8..c696af244de 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.222 2002/11/27 16:23:01 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.223 2002/11/27 18:50:32 henning Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -625,7 +625,7 @@ cbqflags_item : DEFAULT { $$ = CBQCLF_DEFCLASS; } bandwidth : /* empty */ { $$.bw_absolute = 0; - $$.bw_percent = 0; + $$.bw_percent = 100; } | BANDWIDTH STRING { double bps; @@ -2514,9 +2514,6 @@ expand_queue(struct pf_altq *a, struct node_queue *nqueues, struct node_queue *n; u_int8_t added = 0; - if (bwspec.bw_absolute == 0 && bwspec.bw_percent == 0) - bwspec.bw_percent = 100; - LOOP_THROUGH(struct node_queue, tqueue, queues, if (!strncmp(a->qname, tqueue->queue, PF_QNAME_SIZE)) { /* found ourselve in queues */ |