redesigned version of bgp in bird2 changes the rs client behaviour
Alexander Zubkov
green at qrator.net
Fri Nov 2 12:43:54 CET 2018
Hello,
I found out that bird version 2 prepends its ASN when exporting to eBGP
peer and "rs client" option enabled. I made some investigation and found
out that bgp code was hardly redesigned and the logic of "rs client" was
changed.
Here is v1.
https://gitlab.labs.nic.cz/labs/bird/blob/fff79b1c1e0577f487b4fb67f79a74b054d734b6/proto/bgp/attrs.c#L1100
if (!p->is_internal && !p->rs_client)
{
bgp_path_prepend(e, attrs, pool, p->local_as);
And this is in v2 now.
https://gitlab.labs.nic.cz/labs/bird/blob/e19d08055a4614f03e51ee72617be10946ce7919/proto/bgp/attrs.c#L1451
if (p->is_internal ||
(p->rs_client && src && src->rs_client))
{
If I get it right, it does not prepend its ASN only in the case when route
was received from BGP session too and that session is marked "rs client".
So only prefixes from one "rs client" to another is not prepended.
It looks like it is impossible now to skip prepend for eBGP for some local
routes, for example. I wish it was made an old style way - when "rs client"
skips prepend unconditionally.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20181102/e9bc49ab/attachment.html>
More information about the Bird-users
mailing list