From c83aa1750ace2972ef49e26e9a2deaad0a29ce0d Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 7 Jul 2022 12:38:19 +0000 Subject: [PATCH] Properly break out of the loop setting the PREF flags. --- usr.sbin/bgpd/rde.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 7fa7440d466..cd15b875b8d 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.549 2022/07/07 12:16:04 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.550 2022/07/07 12:38:19 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -2474,6 +2474,8 @@ rde_dump_rib_as(struct prefix *p, struct rde_aspath *asp, pid_t pid, int flags, xp = NULL; /* stop loop */ break; } + if (xp == NULL || xp == p) + break; } if (!peer->conf.ebgp) rib.flags |= F_PREF_INTERNAL; -- 2.20.1