summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hessler <phessler@cvs.openbsd.org>2014-01-24 06:07:14 +0000
committerPeter Hessler <phessler@cvs.openbsd.org>2014-01-24 06:07:14 +0000
commitc51bf53529725fc79ccbcfe5faf6b427237c2883 (patch)
tree12523899529623027eabcbf4fac5146cfc292cc9
parentbadd992ac2bd33bdaa754aa99b542c78db8117eb (diff)
fix the matching for filter rules of 'prefixlen = XX'
OK claudio@
-rw-r--r--usr.sbin/bgpd/rde_filter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_filter.c b/usr.sbin/bgpd/rde_filter.c
index e1e2fb35a5b..68bfd0831d6 100644
--- a/usr.sbin/bgpd/rde_filter.c
+++ b/usr.sbin/bgpd/rde_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_filter.c,v 1.70 2013/10/19 15:04:25 claudio Exp $ */
+/* $OpenBSD: rde_filter.c,v 1.71 2014/01/24 06:07:13 phessler Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -331,8 +331,9 @@ rde_filter_match(struct filter_rule *f, struct rde_aspath *asp,
/* test prefixlen stuff too */
switch (f->match.prefix.op) {
case OP_NONE: /* perfect match */
- case OP_EQ:
return (plen == f->match.prefix.len);
+ case OP_EQ:
+ return (plen == f->match.prefix.len_min);
case OP_NE:
return (plen != f->match.prefix.len_min);
case OP_RANGE: