diff options
author | kn <kn@cvs.openbsd.org> | 2018-07-13 08:41:16 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2018-07-13 08:41:16 +0000 |
commit | 7bdbde9c75f31dcc575f0668e00008a03b00c65f (patch) | |
tree | ba48c16e4f195e62c62bdc379d2183872d453169 /sbin/pfctl/parse.y | |
parent | 48c51fb52b67e8e902c63ba4594e449353f40f5f (diff) |
Fix regression on child queue definitions
I comitted the wrong diff in 1.680 which turned `queue cq parent pq ...'
into invalid syntax by changing `interface' to `ON if_item'.
Found by bket, thanks!
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r-- | sbin/pfctl/parse.y | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 949613f0e2a..dcae4959c55 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.680 2018/07/11 18:06:25 kn Exp $ */ +/* $OpenBSD: parse.y,v 1.681 2018/07/13 08:41:15 kn Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -1326,20 +1326,21 @@ table_host_list : tablespec optnl { $$ = $1; } } ; -queuespec : QUEUE STRING ON if_item queue_opts { +queuespec : QUEUE STRING interface queue_opts { struct node_host *n; - if ($4 == NULL && $5.parent == NULL) { + if ($3 == NULL && $4.parent == NULL) { yyerror("root queue without interface"); YYERROR; } - if ((n = ifa_exists($4->ifname)) == NULL || - n->af != AF_LINK) { + if ($3 != NULL && + ((n = ifa_exists($3->ifname)) == NULL || + n->af != AF_LINK)) { yyerror("not an interface"); YYERROR; } - expand_queue($2, $4, &$5); + expand_queue($2, $3, &$4); } ; |