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. I'm still trying to find a convincing argument for why the bad case can never happen though. Can you think of a codepath that calls rt_notify with one of our own routes outside of us calling into rte_update*? I'm having a hard time reading the rt-table code, it just has so many twists and turns :) As long as that can never happens I just have to worry about our babel internal object lifetimes. > I should definitely put some time into writing a "how to write a protocol" > guide. Let me know if/when you need a clueless dummy to bounce drafts off of ;) Thanks, --Daniel
