summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2018-09-13 11:25:41 +0000
committerclaudio <claudio@openbsd.org>2018-09-13 11:25:41 +0000
commit5d31d72b0e8225b3484f918958811b41d6078ea9 (patch)
treedadcf8a005b9f20e94e8ad4d1d704940169994b8
parentAdjust after introduction of maxlen (diff)
downloadwireguard-openbsd-5d31d72b0e8225b3484f918958811b41d6078ea9.tar.xz
wireguard-openbsd-5d31d72b0e8225b3484f918958811b41d6078ea9.zip
Noticed that the equal case is a bit wrong while adjusting the regress tests.
This is better. There is no need to check for the prefix length p->len.
-rw-r--r--usr.sbin/bgpd/printconf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c
index aa9d79384ea..48b1404b47b 100644
--- a/usr.sbin/bgpd/printconf.c
+++ b/usr.sbin/bgpd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.118 2018/09/13 11:16:21 claudio Exp $ */
+/* $OpenBSD: printconf.c,v 1.119 2018/09/13 11:25:41 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -84,8 +84,8 @@ print_prefix(struct filter_prefix *p)
printf(" prefixlen %u >< %u ", p->len_min, p->len_max);
break;
case OP_RANGE:
- if (p->len == p->len_min && p->len == p->len_max)
- printf(" prefixlen = %u", p->len);
+ if (p->len_min == p->len_max)
+ printf(" prefixlen = %u", p->len_min);
else if (p->len == p->len_min && p->len_max == max_len)
printf(" or-longer");
else if (p->len == p->len_min)