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.