From: claudio Date: Tue, 31 Jul 2018 08:04:49 +0000 (+0000) Subject: There is no longer the need to be careful in rde_softreconfig_in() when X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=95b1fd20f8e6d193594791eda4b50dd69653cdd2;p=openbsd There is no longer the need to be careful in rde_softreconfig_in() when traversing the prefix list. Since a while Adj-RIB-In is fully independent and so updating the local RIB does not modify that list. OK benno@ --- diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 7c8480925cf..e72b40643ac 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.402 2018/07/27 12:03:17 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.403 2018/07/31 08:04:49 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -2843,7 +2843,7 @@ rde_softreconfig_in(struct rib_entry *re, void *ptr) { struct filterstate state; struct rib_desc *rib = ptr; - struct prefix *p, *np; + struct prefix *p; struct pt_entry *pt; struct rde_peer *peer; struct rde_aspath *asp; @@ -2852,12 +2852,7 @@ rde_softreconfig_in(struct rib_entry *re, void *ptr) pt = re->prefix; pt_getaddr(pt, &addr); - for (p = LIST_FIRST(&re->prefix_h); p != NULL; p = np) { - /* - * prefix_remove() and path_update() may change the object - * so cache the values. - */ - np = LIST_NEXT(p, rib_l); + LIST_FOREACH(p, &re->prefix_h, rib_l) { asp = prefix_aspath(p); peer = asp->peer;