<div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<br><br>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.<br>Here is v1.<br><a href="https://gitlab.labs.nic.cz/labs/bird/blob/fff79b1c1e0577f487b4fb67f79a74b054d734b6/proto/bgp/attrs.c#L1100">https://gitlab.labs.nic.cz/labs/bird/blob/fff79b1c1e0577f487b4fb67f79a74b054d734b6/proto/bgp/attrs.c#L1100</a><br><br>  if (!p->is_internal && !p->rs_client)<br>    {<br>      bgp_path_prepend(e, attrs, pool, p->local_as);</div><div dir="ltr"><br></div><div>And this is in v2 now.</div><div><a href="https://gitlab.labs.nic.cz/labs/bird/blob/e19d08055a4614f03e51ee72617be10946ce7919/proto/bgp/attrs.c#L1451">https://gitlab.labs.nic.cz/labs/bird/blob/e19d08055a4614f03e51ee72617be10946ce7919/proto/bgp/attrs.c#L1451</a><br><br>  if (p->is_internal ||<br>      (p->rs_client && src && src->rs_client))<br>  {</div><div><br></div><div>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.</div><div><br></div><div>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.<br></div></div></div>