summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2002-12-21 18:53:49 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2002-12-21 18:53:49 +0000
commit3a53b74ef99907f8454f15979e7eac50194d8ea0 (patch)
treeb4f43b48138e6807546816fcfed2fe2d3743d421 /sbin/pfctl/parse.y
parent04a4999c31413895a3772f406d041c1b0a595c04 (diff)
always initialize rpool.key; diff from Frank Denis; KNF by me
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y26
1 files changed, 21 insertions, 5 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 7a6038a9d6c..dd3416b31c5 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.268 2002/12/21 18:47:33 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.269 2002/12/21 18:53:48 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -2076,15 +2076,31 @@ hashkey : /* empty */
}
;
-pooltype : /* empty */ { $$.type = PF_POOL_NONE; }
- | BITMASK { $$.type = PF_POOL_BITMASK; }
- | RANDOM { $$.type = PF_POOL_RANDOM; }
+pooltype : /* empty */
+ {
+ $$.type = PF_POOL_NONE;
+ $$.key = NULL;
+ }
+ | BITMASK
+ {
+ $$.type = PF_POOL_BITMASK;
+ $$.key = NULL;
+ }
+ | RANDOM
+ {
+ $$.type = PF_POOL_RANDOM;
+ $$.key = NULL;
+ }
| SOURCEHASH hashkey
{
$$.type = PF_POOL_SRCHASH;
$$.key = $2;
}
- | ROUNDROBIN { $$.type = PF_POOL_ROUNDROBIN; }
+ | ROUNDROBIN
+ {
+ $$.type = PF_POOL_ROUNDROBIN;
+ $$.key = NULL;
+ }
;
staticport : /* empty */ { $$ = 0; }