diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-05-05 10:48:17 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-05-05 10:48:17 +0000 |
commit | 7684a619bf240c96af942a3d8ae5eceb908ac969 (patch) | |
tree | ab7c295801b325f2f765ccf6b963b0969fe98e11 /usr.sbin/bgpd | |
parent | b741dbb117cdbe49c8825ece72efdadfefd740c5 (diff) |
Pass ASPA objects in reverse since this is what aspa_add_set() expects.
OK tb@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/rtr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rtr.c b/usr.sbin/bgpd/rtr.c index e30d0c4a7b9..e02b09bd822 100644 --- a/usr.sbin/bgpd/rtr.c +++ b/usr.sbin/bgpd/rtr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtr.c,v 1.14 2023/04/20 15:44:45 claudio Exp $ */ +/* $OpenBSD: rtr.c,v 1.15 2023/05/05 10:48:16 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org> @@ -595,7 +595,8 @@ rtr_recalc(void) imsg_compose(ibuf_rde, IMSG_RECONF_ASPA_PREP, 0, 0, -1, &ap, sizeof(ap)); - RB_FOREACH(aspa, aspa_tree, &at) { + /* walk tree in reverse because aspa_add_set requires that */ + RB_FOREACH_REVERSE(aspa, aspa_tree, &at) { uint32_t as[2]; as[0] = aspa->as; as[1] = aspa->num; |