From: claudio Date: Thu, 7 Jul 2022 12:38:19 +0000 (+0000) Subject: Properly break out of the loop setting the PREF flags. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c83aa1750ace2972ef49e26e9a2deaad0a29ce0d;p=openbsd Properly break out of the loop setting the PREF flags. --- 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;