diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-06 19:11:37 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2005-03-06 19:11:37 +0000 |
commit | ad16485141de26cfcf4dc30019341f02fd196f73 (patch) | |
tree | a4a5c54b585a64bbd7da7fc348ffbe7bdce364ba /sbin | |
parent | efb01f3b9d96172e4e5b603212b2320873caab69 (diff) |
allow commas in the hfsc service curve spec, inconsistency pointed out in
PR4134 / geoff@collyer.net and a longer mail exhcange with han boetes
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/parse.y | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 7b480ba59f5..0d27a1451f8 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.480 2005/03/06 02:40:08 dhartmei Exp $ */ +/* $OpenBSD: parse.y,v 1.481 2005/03/06 19:11:36 henning Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -1393,14 +1393,15 @@ hfscopts_item : LINKSHARE bandwidth { hfsc_opts.linkshare.m2 = $2; hfsc_opts.linkshare.used = 1; } - | LINKSHARE '(' bandwidth number bandwidth ')' { + | LINKSHARE '(' bandwidth comma number comma bandwidth ')' + { if (hfsc_opts.linkshare.used) { yyerror("linkshare already specified"); YYERROR; } hfsc_opts.linkshare.m1 = $3; - hfsc_opts.linkshare.d = $4; - hfsc_opts.linkshare.m2 = $5; + hfsc_opts.linkshare.d = $5; + hfsc_opts.linkshare.m2 = $7; hfsc_opts.linkshare.used = 1; } | REALTIME bandwidth { @@ -1411,14 +1412,15 @@ hfscopts_item : LINKSHARE bandwidth { hfsc_opts.realtime.m2 = $2; hfsc_opts.realtime.used = 1; } - | REALTIME '(' bandwidth number bandwidth ')' { + | REALTIME '(' bandwidth comma number comma 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.d = $5; + hfsc_opts.realtime.m2 = $7; hfsc_opts.realtime.used = 1; } | UPPERLIMIT bandwidth { @@ -1429,14 +1431,15 @@ hfscopts_item : LINKSHARE bandwidth { hfsc_opts.upperlimit.m2 = $2; hfsc_opts.upperlimit.used = 1; } - | UPPERLIMIT '(' bandwidth number bandwidth ')' { + | UPPERLIMIT '(' bandwidth comma number comma 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; + hfsc_opts.upperlimit.d = $5; + hfsc_opts.upperlimit.m2 = $7; hfsc_opts.upperlimit.used = 1; } | STRING { |