On Mon, Mar 21, 2022 at 01:19:53PM +0100, Theo Buehler wrote: > On Mon, Mar 21, 2022 at 12:24:33PM +0100, Claudio Jeker wrote: > > During config reload the RIB may need to be resynced when the > > 'no evaluate' setting changes. > > > > This changes the code to actually flush the Adj-RIB-Out of affected peers > > and then adjust the RIB in a 2nd step. That way there is no need to use > > rde_generate_updates() to remove the prefixes one by one in the NOFIB case. > > > > Also fix the loop to reinsert all prefixes to remove the prefix from the > > temporary list before calling prefix_evaluate(). Calling prefix_evaluate() > > with p as the old prefix is just wrong. It is not on the rib_entry list at > > that time. > > I'm ok with this. > > I noticed that the bit changing prefix_evaluate(re, p, p) to > prefix_evaluate(re, p, NULL) undoes part of rde.c r1.512 whose commit > message said > > Doing the LIST_REMOVE() outside of prefix_evalute() is no longer valid.
Yes, I think that was in this case a mistake. This is a rather special case. The full list is first removed from the rib_entry by copying the LIST_HEAD and LIST_INIT. So this is no longer a case of a LIST_REMOVE() of a prefix that is part of evaluated prefixes. > > This can be improved further but since this code path is almost never > > needed (changing rib flags happens almost never) it is not urgent. > > -- > > :wq Claudio > > > > Index: rde.c > > =================================================================== > > RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v > > retrieving revision 1.541 > > diff -u -p -r1.541 rde.c > > --- rde.c 21 Mar 2022 10:15:34 -0000 1.541 > > +++ rde.c 21 Mar 2022 11:13:34 -0000 > > @@ -3469,7 +3469,33 @@ rde_reload_done(void) > > rib_free(rib); > > break; > > case RECONF_RELOAD: > > - rib_update(rib); > > + if (rib_update(rib)) { > > + LIST_FOREACH(peer, &peerlist, peer_l) { > > + /* ignore peerself*/ > > Missing space after peerself Hah, there is another copy of that further up. Fixed both. -- :wq Claudio