summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/printconf.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-09-20 07:46:40 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-09-20 07:46:40 +0000
commit2d889519bcd7f6515561294c37adca6c075b8ba4 (patch)
tree187febb3e885c8830136213a40e819c35eded85b /usr.sbin/bgpd/printconf.c
parent2eb060930a171170f9bea4e6b4eed822e09550dc (diff)
Switch prefixset to an RB_TREE instead of a SIMPLEQ. This allows to trigger
on duplicates (which are only reported) but is needed as a preparation step for roa-sets. OK benno@ denis@
Diffstat (limited to 'usr.sbin/bgpd/printconf.c')
-rw-r--r--usr.sbin/bgpd/printconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c
index 48b1404b47b..43d4b31060e 100644
--- a/usr.sbin/bgpd/printconf.c
+++ b/usr.sbin/bgpd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.119 2018/09/13 11:25:41 claudio Exp $ */
+/* $OpenBSD: printconf.c,v 1.120 2018/09/20 07:46:39 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -451,7 +451,7 @@ print_prefixsets(struct prefixset_head *psh)
SIMPLEQ_FOREACH(ps, psh, entry) {
int count = 0;
printf("prefix-set \"%s\" {", ps->name);
- SIMPLEQ_FOREACH(psi, &ps->psitems, entry) {
+ RB_FOREACH(psi, prefixset_tree, &ps->psitems) {
if (count++ % 2 == 0)
printf("\n\t");
else