[PATCH v3] Babel: Replace internal route selection by bird's nest

Ondrej Zajicek santiago at crfreenet.org
Sat Feb 11 17:18:32 CET 2023


On Sat, Feb 11, 2023 at 02:02:05PM +0100, dxld at darkboxed.org wrote:
> Hi Maria,
> 
> On Mon, Feb 06, 2023 at 02:19:53PM +0100, Maria Matejka wrote:
> > Picking up this, hoping that it is still relevant.
> 
> Yes, absolutely :)
> 
> > You can do this as the import/export limits in BGP do exactly this, yet the
> > appropriate function
> > 
> >   void proto_schedule_down(struct proto *p, byte restart, byte code);
> > 
> > is currently marked static. There is no problem making this function static
> > in case the protocol needs restart.
> > 
> > Another way to do this is to initiate the protocol shutdown yourself by
> > calling proto_notify_state(p, PS_DOWN) which restarts the protocol unless
> > you set disabled = 1 … or if you need to do some asynchronous work, you may
> > call first proto_notify_state(p, PS_STOP), then do and schedule that work
> > and after it is finally done, you call proto_notify_state(p, PS_DOWN).
> 
> Perfect that sounds like what we'd want to do in this case.

Hi

I think it is unnecessary complex way to handle internal bugs. Just use
ASSERT() / ASSERT_DIE() / bug(). Perhaps we could have ASSERT()-variant
that allows more graceful recovery (e.g. return), but it is probably
better to not assume some complex condition if you are not sure it is
true, especially if it depends on structure of calls between multiple
independent components (babel, nest).

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."



More information about the Bird-users mailing list