summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2018-09-27 13:48:01 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2018-09-27 13:48:01 +0000
commit46eee10962117d87ae97d90e16c3a2b58afb7e03 (patch)
tree8d27ffbdd848327affbfeb49fb7b1aac65b6ab38 /usr.sbin/bgpd
parent6992bbf0aaad9b429165bf85787c9d2c14a711bc (diff)
unbreak "inet" and "inet6" aliases in filters after rev. 1.333
ok claudio@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/parse.y16
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index d50657655c5..43ecd4a3f30 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.359 2018/09/21 08:17:15 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.360 2018/09/27 13:48:00 benno Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1892,8 +1892,11 @@ filter_peer : ANY {
;
filter_prefix_h : IPV4 prefixlenop {
- if ($2.op == OP_NONE)
- $2.op = OP_GE;
+ if ($2.op == OP_NONE) {
+ $2.op = OP_RANGE;
+ $2.len_min = 0;
+ $2.len_max = -1;
+ }
if (($$ = calloc(1, sizeof(struct filter_prefix_l))) ==
NULL)
fatal(NULL);
@@ -1904,8 +1907,11 @@ filter_prefix_h : IPV4 prefixlenop {
}
}
| IPV6 prefixlenop {
- if ($2.op == OP_NONE)
- $2.op = OP_GE;
+ if ($2.op == OP_NONE) {
+ $2.op = OP_RANGE;
+ $2.len_min = 0;
+ $2.len_max = -1;
+ }
if (($$ = calloc(1, sizeof(struct filter_prefix_l))) ==
NULL)
fatal(NULL);