[PATCH v3] Babel: Replace internal route selection by bird's nest
Maria Matejka
maria.matejka at nic.cz
Mon Feb 6 14:19:53 CET 2023
Hello!
Picking up this, hoping that it is still relevant.
>> Is there a way we can easily trigger a protocol restart instead of crashing
>> all of bird with an assertion here if this does happen against all odds?
>
> Hmm, no, I don't think there's any way that the protocol can signal to
> the nest that it has gotten itself into an inconsistent state and needs
> to be restarted. Not sure if it's better to just crash in this case, or
> if we should add such a mechanism? Hopefully Ondrej has an opinion...
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).
Note that notifying DOWN is the last thing you want to do; your memory
may get freed any time after that.
I should definitely put some time into writing a "how to write a
protocol" guide.
Hope this helps you.
Maria
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2839 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20230206/03201934/attachment.p7s>
More information about the Bird-users
mailing list