summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/pfctl/parse.y18
1 files changed, 17 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 8b16b7cd684..4015279deee 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.363 2003/04/13 23:34:31 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.364 2003/04/13 23:39:18 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1068,20 +1068,36 @@ hfscopts_item : LINKSHARE bandwidth {
hfsc_opts.linkshare.used = 1;
}
| REALTIME bandwidth {
+ if (hfsc_opts.realtime.used) {
+ yyerror("realtime already specified");
+ YYERROR;
+ }
hfsc_opts.realtime.m2 = $2;
hfsc_opts.realtime.used = 1;
}
| REALTIME '(' bandwidth number bandwidth ')' {
+ if (hfsc_opts.realtime.used) {
+ yyerror("realtime already specified");
+ YYERROR;
+ }
hfsc_opts.realtime.m1 = $3;
hfsc_opts.realtime.d = $4;
hfsc_opts.realtime.m2 = $5;
hfsc_opts.realtime.used = 1;
}
| UPPERLIMIT bandwidth {
+ if (hfsc_opts.upperlimit.used) {
+ yyerror("upperlimit already specified");
+ YYERROR;
+ }
hfsc_opts.upperlimit.m2 = $2;
hfsc_opts.upperlimit.used = 1;
}
| UPPERLIMIT '(' bandwidth number bandwidth ')' {
+ if (hfsc_opts.upperlimit.used) {
+ yyerror("upperlimit already specified");
+ YYERROR;
+ }
hfsc_opts.upperlimit.m1 = $3;
hfsc_opts.upperlimit.d = $4;
hfsc_opts.upperlimit.m2 = $5;