summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/printconf.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-09-13 11:25:42 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-09-13 11:25:42 +0000
commitaf0479cc5a33b447fbb264b10abd485dac8a0bc8 (patch)
treee21e0f095f1e4fa00d7b08a87e6ba0ec5b000495 /usr.sbin/bgpd/printconf.c
parent66063e7591c639aeb3ca654e4741c629cb25c522 (diff)
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.
Diffstat (limited to 'usr.sbin/bgpd/printconf.c')
-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)